t5601: read HEAD using rev-parse

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Reviewed-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Han-Wen Nienhuys committed May 31, 2021 at 16:56 UTC dd8468ef000ec115d8e49d8b7063e30764592b0f
1 file changed +2 -1
t/t5601-clone.sh
+2 -1
@@ -305,7 +305,8 @@ test_expect_success 'clone from original with relative alternate' '
305 test_expect_success 'clone checking out a tag' '
306 git clone --branch=some-tag src dst.tag &&
307 GIT_DIR=src/.git git rev-parse some-tag >expected &&
308 - test_cmp expected dst.tag/.git/HEAD &&
308 + GIT_DIR=dst.tag/.git git rev-parse HEAD >actual &&
309 + test_cmp expected actual &&
310 GIT_DIR=dst.tag/.git git config remote.origin.fetch >fetch.actual &&
311 echo "+refs/heads/*:refs/remotes/origin/*" >fetch.expected &&
312 test_cmp fetch.expected fetch.actual