Skip to content

Commit f1ed224

Browse files
hanwengitster
authored andcommitted
t5000: inspect HEAD using git-rev-parse
Signed-off-by: Han-Wen Nienhuys <[email protected]> Reviewed-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9c8e7e9 commit f1ed224

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

t/t5000-tar-tree.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -243,10 +243,11 @@ test_expect_success 'validate file modification time' '
243243
test_cmp expected.mtime b.mtime
244244
'
245245

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+
'
250251

251252
test_expect_success 'git archive with --output, override inferred format' '
252253
git archive --format=tar --output=d4.zip HEAD &&

0 commit comments

Comments
 (0)