Skip to content

Commit

Permalink
t5004: fix issue with empty archive test and bsdtar
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
René Scharfe authored and Junio C Hamano committed Apr 10, 2013
1 parent bd54cf1 commit 24676f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/t5004-archive-corner-cases.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ check_dir() {
}

test_expect_success 'tar archive of empty tree is empty' '
git archive --format=tar HEAD >empty.tar &&
git archive --format=tar HEAD: >empty.tar &&
make_dir extract &&
"$TAR" xf empty.tar -C extract &&
check_dir extract
Expand Down

0 comments on commit 24676f0

Please sign in to comment.