t5000: inspect HEAD using git-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 f1ed224753728b6defc6bc6e9058717a0645482d
1 file changed +5 -4
t/t5000-tar-tree.sh
+5 -4
@@ -243,10 +243,11 @@ test_expect_success 'validate file modification time' '
243 test_cmp expected.mtime b.mtime
244 '
245
246 -test_expect_success \
247 - 'git get-tar-commit-id' \
248 - 'git get-tar-commit-id <b.tar >b.commitid &&
249 - test_cmp .git/$(git symbolic-ref HEAD) b.commitid'
246 +test_expect_success 'git get-tar-commit-id' '
247 + git get-tar-commit-id <b.tar >actual &&
248 + git rev-parse HEAD >expect &&
249 + test_cmp expect actual
250 +'
251
252 test_expect_success 'git archive with --output, override inferred format' '
253 git archive --format=tar --output=d4.zip HEAD &&