summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2018-04-10 08:25:45 +0900
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-04-10 08:25:45 +0900
commitca923f72653f5bfc61933ee334ca5fe34d4fe5f0 (patch)
tree2e0439f6b79469bc996b273270891e0cc0b332e6 /t
parentMerge branch 'bc/object-id' (diff)
parentworktree prune: improve prune logic when worktree is moved (diff)
downloadtgif-ca923f72653f5bfc61933ee334ca5fe34d4fe5f0.tar.xz
Merge branch 'nd/worktree-prune'
The way "git worktree prune" worked internally has been simplified, by assuming how "git worktree move" moves an existing worktree to a different place. * nd/worktree-prune: worktree prune: improve prune logic when worktree is moved worktree: delete dead code gc.txt: more details about what gc does
Diffstat (limited to 't')
-rwxr-xr-xt/t2026-worktree-prune.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/t/t2026-worktree-prune.sh b/t/t2026-worktree-prune.sh
index a0f1e3bb80..b7d6d5d45a 100755
--- a/t/t2026-worktree-prune.sh
+++ b/t/t2026-worktree-prune.sh
@@ -78,10 +78,9 @@ test_expect_success 'not prune locked checkout' '
test_expect_success 'not prune recent checkouts' '
test_when_finished rm -r .git/worktrees &&
- mkdir zz &&
- mkdir -p .git/worktrees/jlm &&
- echo "$(pwd)"/zz >.git/worktrees/jlm/gitdir &&
- rmdir zz &&
+ git worktree add jlm HEAD &&
+ test -d .git/worktrees/jlm &&
+ rm -rf jlm &&
git worktree prune --verbose --expire=2.days.ago &&
test -d .git/worktrees/jlm
'