Merge branch 'js/gcc-8-and-9'
[gitweb.git] / t / t3203-branch-output.sh
index 4bef8c75697d1725c6068091f045e71753951fda..71818b90f00d3727cb00e24da181fc9dec420f08 100755 (executable)
@@ -136,13 +136,14 @@ test_expect_success 'git branch `--show-current` works properly with worktrees'
        branch-two
        EOF
        git checkout branch-one &&
+       test_when_finished "
+               git worktree remove worktree_dir
+       " &&
        git worktree add worktree_dir branch-two &&
        {
                git branch --show-current &&
                git -C worktree_dir branch --show-current
        } >actual &&
-       rm -r worktree_dir &&
-       git worktree prune &&
        test_cmp expect actual
 '