]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t3200: cleanup cruft of a test
authorKaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Thu, 17 Aug 2017 02:54:23 +0000 (08:24 +0530)
committerJunio C Hamano <gitster@pobox.com>
Thu, 17 Aug 2017 19:51:37 +0000 (12:51 -0700)
Avoiding the clean up step of tests may help in some cases but in other
cases they cause the other unrelated tests to fail for unobvious reasons.
It's better to cleanup a few things to keep other tests from failing
as a result of it.

So, cleanup a cruft left behind by an old test in order for the changes that
are to be introduced to be independent of it.

Signed-off-by: Kaartic Sivaraam <kaarticsivaraam91196@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t3200-branch.sh

index 9d707d2a40a457abcd85fb93d9f8195946d09d01..002433bc27edf344951c9407a10a01c2c0969d2c 100755 (executable)
@@ -559,6 +559,7 @@ test_expect_success 'use --set-upstream-to modify HEAD' '
 test_expect_success 'use --set-upstream-to modify a particular branch' '
        git branch my13 &&
        git branch --set-upstream-to master my13 &&
+       test_when_finished "git branch --unset-upstream my13" &&
        test "$(git config branch.my13.remote)" = "." &&
        test "$(git config branch.my13.merge)" = "refs/heads/master"
 '