t5512: run git fetch inside test
authorRené Scharfe <l.s.r@web.de>
Sat, 12 May 2018 08:45:23 +0000 (10:45 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 13 May 2018 23:49:17 +0000 (08:49 +0900)
Do the preparatory fetch inside the test of ls-remote --symref to avoid
cluttering the test output and to be able to catch unexpected fetch
failures.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t5512-ls-remote.sh

index 83cd35c..6a94948 100755 (executable)
@@ -206,8 +206,8 @@ test_expect_success 'overrides work between mixed transfer/upload-pack hideRefs'
        grep refs/tags/magic actual
 '
 
-git fetch origin
 test_expect_success 'ls-remote --symref' '
+       git fetch origin &&
        cat >expect <<-EOF &&
        ref: refs/heads/master  HEAD
        $(git rev-parse HEAD)   HEAD