]> git.ipfire.org Git - thirdparty/git.git/commitdiff
tests: push: trivial cleanup
authorFelipe Contreras <felipe.contreras@gmail.com>
Thu, 26 Nov 2020 00:16:15 +0000 (18:16 -0600)
committerJunio C Hamano <gitster@pobox.com>
Mon, 30 Nov 2020 21:57:54 +0000 (13:57 -0800)
No need to do two checkouts.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5516-fetch-push.sh

index 4077471937d477079a837f6d5d31ac3f7aa5897a..245eafb170c83f7a3749e06cf3392c7d16e1bed0 100755 (executable)
@@ -457,8 +457,7 @@ test_expect_success 'push with HEAD nonexisting at remote' '
 test_expect_success 'push with +HEAD' '
 
        mk_test testrepo heads/master &&
-       git checkout master &&
-       git checkout -b local &&
+       git checkout -b local master &&
        test_when_finished "git checkout master; git branch -D local" &&
        git push testrepo master local &&
        check_push_result testrepo $the_commit heads/master &&