From: Junio C Hamano Date: Wed, 10 Feb 2021 22:48:32 +0000 (-0800) Subject: Merge branch 'rs/worktree-list-verbose' X-Git-Tag: v2.31.0-rc0~64 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=02fb21617e0da10c6cadb1c55147299456633bca;p=thirdparty%2Fgit.git Merge branch 'rs/worktree-list-verbose' `git worktree list` now annotates worktrees as prunable, shows locked and prunable attributes in --porcelain mode, and gained a --verbose option. * rs/worktree-list-verbose: worktree: teach `list` verbose mode worktree: teach `list` to annotate prunable worktree worktree: teach `list --porcelain` to annotate locked worktree t2402: ensure locked worktree is properly cleaned up worktree: teach worktree_lock_reason() to gently handle main worktree worktree: teach worktree to lazy-load "prunable" reason worktree: libify should_prune_worktree() --- 02fb21617e0da10c6cadb1c55147299456633bca diff --cc t/t2402-worktree-list.sh index 821a20f3d6,39a339e636..42d35d9ae8 --- a/t/t2402-worktree-list.sh +++ b/t/t2402-worktree-list.sh @@@ -66,9 -63,10 +66,10 @@@ test_expect_success '"list" all worktre test_expect_success '"list" all worktrees with locked annotation' ' test_when_finished "rm -rf locked unlocked out && git worktree prune" && - git worktree add --detach locked master && - git worktree add --detach unlocked master && + git worktree add --detach locked main && + git worktree add --detach unlocked main && git worktree lock locked && + test_when_finished "git worktree unlock locked" && git worktree list >out && grep "/locked *[0-9a-f].* locked$" out && ! grep "/unlocked *[0-9a-f].* locked$" out