]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5510: cleanup remote in followRemoteHEAD dangling ref test
authorMatt Hunter <m@lfurio.us>
Fri, 19 Jun 2026 09:44:22 +0000 (05:44 -0400)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Jun 2026 16:19:35 +0000 (09:19 -0700)
A later patch will introduce a new test which closely mirrors this one.
Update this test to remove the 'custom-head' remote it creates.
Otherwise, the two tests will conflict with each other, as the second
one to execute will fail to create this remote (which already exists,
thanks to the first test).

Signed-off-by: Matt Hunter <m@lfurio.us>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5510-fetch.sh

index eca9a973b5cb16dc74db12b083580c8270b580a6..43190630e714d69505c5579fabc755ca44166f07 100755 (executable)
@@ -251,6 +251,7 @@ test_expect_success 'followRemoteHEAD does not kick in with refspecs' '
 '
 
 test_expect_success 'followRemoteHEAD create does not overwrite dangling symref' '
+       test_when_finished "git -C two remote remove custom-head" &&
        git -C two remote add -m does-not-exist custom-head ../one &&
        test_config -C two remote.custom-head.followRemoteHEAD create &&
        git -C two fetch custom-head &&