Skip to content

Commit b310755

Browse files
pabloosabaterrgitster
authored andcommitted
t5516: clean up cloned and new-wt in denyCurrentBranch and worktrees test
The 'denyCurrentBranch and worktrees' test creates a 'cloned' and a 'new-wt' but it doesn't clean them after the test. This makes other tests that use the same name after this one to fail. Add test_when_finished to clean them at the end. Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 80871f3 commit b310755

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t5516-fetch-push.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1792,6 +1792,7 @@ test_expect_success 'updateInstead with push-to-checkout hook' '
17921792
'
17931793

17941794
test_expect_success 'denyCurrentBranch and worktrees' '
1795+
test_when_finished "rm -fr cloned && git worktree remove --force new-wt" &&
17951796
git worktree add new-wt &&
17961797
git clone . cloned &&
17971798
test_commit -C cloned first &&

0 commit comments

Comments
 (0)