diff options
Diffstat (limited to 't/t5304-prune.sh')
-rwxr-xr-x | t/t5304-prune.sh | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t5304-prune.sh b/t/t5304-prune.sh index cba45c7..683bdb0 100755 --- a/t/t5304-prune.sh +++ b/t/t5304-prune.sh @@ -292,4 +292,16 @@ test_expect_success 'prune: handle index in multiple worktrees' ' test_cmp second-worktree/blob actual ' +test_expect_success 'prune: handle HEAD in multiple worktrees' ' + git worktree add --detach third-worktree && + echo "new blob for third-worktree" >third-worktree/blob && + git -C third-worktree add blob && + git -C third-worktree commit -m "third" && + rm .git/worktrees/third-worktree/index && + test_must_fail git -C third-worktree show :blob && + git prune --expire=now && + git -C third-worktree show HEAD:blob >actual && + test_cmp third-worktree/blob actual +' + test_done |