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 <[email protected]> Signed-off-by: Rene Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bd54cf1 commit 24676f0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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)