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>
René Scharfe committed
Apr 10, 2013 at 19:00 UTC
24676f02ba8bcf0f2c5cccd02825e15ca93bb5f4
1 file changed
+1
-1
t/t5004-archive-corner-cases.sh
+1
-1
@@ -28,7 +28,7 @@ check_dir() {
28
}
29
30
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 &&
32
make_dir extract &&
33
"$TAR" xf empty.tar -C extract &&
34
check_dir extract