Skip to content

Commit 24676f0

Browse files
René Scharfegitster
authored andcommitted
t5004: fix issue with empty archive test and bsdtar
bsdtar, which is the default tar on Mac OS X, handles empty archives just fine but reports archives containing only a pax extended header comment as damaged. Work around the issue by explicitly generating the archive for the tree and not the commit, which causes git archive to omit the commit hash comment record from the tar file. Reported-by: BJ Hargrave <bj@bjhargrave.com> Signed-off-by: Rene Scharfe <rene.scharfe@lsrfire.ath.cx> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent bd54cf1 commit 24676f0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

t/t5004-archive-corner-cases.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ check_dir() {
2828
}
2929

3030
test_expect_success 'tar archive of empty tree is empty' '
31-
git archive --format=tar HEAD >empty.tar &&
31+
git archive --format=tar HEAD: >empty.tar &&
3232
make_dir extract &&
3333
"$TAR" xf empty.tar -C extract &&
3434
check_dir extract

0 commit comments

Comments
 (0)