summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2019-06-13 13:19:41 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2019-06-13 13:19:41 -0700
commit000bce0ee4d0ef719b84fb643c45fe68fa4bb773 (patch)
tree10840f2b1f53f5549db2eafb4493443fcefe3303 /t
parentMerge branch 'js/rebase-cleanup' (diff)
parentworktree add: be tolerant of corrupt worktrees (diff)
downloadtgif-000bce0ee4d0ef719b84fb643c45fe68fa4bb773.tar.xz
Merge branch 'nd/corrupt-worktrees'
"git worktree add" used to fail when another worktree connected to the same repository was corrupt, which has been corrected. * nd/corrupt-worktrees: worktree add: be tolerant of corrupt worktrees
Diffstat (limited to 't')
-rwxr-xr-xt/t2400-worktree-add.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/t/t2400-worktree-add.sh b/t/t2400-worktree-add.sh
index c989dbe321..e819ba741e 100755
--- a/t/t2400-worktree-add.sh
+++ b/t/t2400-worktree-add.sh
@@ -575,4 +575,16 @@ test_expect_success FUNNYNAMES 'sanitize generated worktree name' '
test -d .git/worktrees/---weird-.-
'
+test_expect_success '"add" should not fail because of another bad worktree' '
+ git init add-fail &&
+ (
+ cd add-fail &&
+ test_commit first &&
+ mkdir sub &&
+ git worktree add sub/to-be-deleted &&
+ rm -rf sub &&
+ git worktree add second
+ )
+'
+
test_done