Merge branch 'ss/rename-tests'
[gitweb.git] / t / t2028-worktree-move.sh
index 1b5079e8fa1dadc537338ec005e56a6d4bb9e5ca..33c033773367a135d4cb7eb23f9e9d3131197174 100755 (executable)
@@ -173,4 +173,16 @@ test_expect_success 'remove locked worktree (force)' '
        git worktree remove --force --force gumby
 '
 
+test_expect_success 'remove cleans up .git/worktrees when empty' '
+       git init moog &&
+       (
+               cd moog &&
+               test_commit bim &&
+               git worktree add --detach goom &&
+               test_path_exists .git/worktrees &&
+               git worktree remove goom &&
+               test_path_is_missing .git/worktrees
+       )
+'
+
 test_done