summaryrefslogtreecommitdiff
path: root/t/t2402-worktree-list.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t2402-worktree-list.sh')
-rwxr-xr-xt/t2402-worktree-list.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/t/t2402-worktree-list.sh b/t/t2402-worktree-list.sh
index 52585ec..795ddca 100755
--- a/t/t2402-worktree-list.sh
+++ b/t/t2402-worktree-list.sh
@@ -61,6 +61,16 @@ test_expect_success '"list" all worktrees --porcelain' '
test_cmp expect actual
'
+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 lock locked &&
+ git worktree list >out &&
+ grep "/locked *[0-9a-f].* locked$" out &&
+ ! grep "/unlocked *[0-9a-f].* locked$" out
+'
+
test_expect_success 'bare repo setup' '
git init --bare bare1 &&
echo "data" >file1 &&