]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t5601: read HEAD using rev-parse
authorHan-Wen Nienhuys <hanwen@google.com>
Mon, 31 May 2021 16:56:19 +0000 (16:56 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Jun 2021 01:01:54 +0000 (10:01 +0900)
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>
t/t5601-clone.sh

index 329ae599fd3c629b3ff354d6058fbb22b219c9d7..7223372c766004ca61a1edf697f74a18acfc0d45 100755 (executable)
@@ -305,7 +305,8 @@ test_expect_success 'clone from original with relative alternate' '
 test_expect_success 'clone checking out a tag' '
        git clone --branch=some-tag src dst.tag &&
        GIT_DIR=src/.git git rev-parse some-tag >expected &&
-       test_cmp expected dst.tag/.git/HEAD &&
+       GIT_DIR=dst.tag/.git git rev-parse HEAD >actual &&
+       test_cmp expected actual &&
        GIT_DIR=dst.tag/.git git config remote.origin.fetch >fetch.actual &&
        echo "+refs/heads/*:refs/remotes/origin/*" >fetch.expected &&
        test_cmp fetch.expected fetch.actual