Merge branch 'jk/am-i-resolved-fix'
[gitweb.git] / t / t2400-worktree-add.sh
index c989dbe321deb333517c59d95d6692032aaea94b..e819ba741ec96018755a08ef956998edfdd1dcc4 100755 (executable)
@@ -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