Add initial support for many promisor remotes
[gitweb.git] / t / t2400-worktree-add.sh
index 286bba35d8ae06f97cbf59263cd472975036deaa..e819ba741ec96018755a08ef956998edfdd1dcc4 100755 (executable)
@@ -570,4 +570,21 @@ test_expect_success '"add" an existing locked but missing worktree' '
        git worktree add --force --force --detach gnoo
 '
 
+test_expect_success FUNNYNAMES 'sanitize generated worktree name' '
+       git worktree add --detach ".  weird*..?.lock.lock" &&
+       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