git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* tar on Mac does not like empty tar from git archive
@ 2013-04-08 18:36 BJ Hargrave
  2013-04-08 21:05 ` Jeff King
  2013-04-10 17:00 ` René Scharfe
  0 siblings, 2 replies; 5+ messages in thread
From: BJ Hargrave @ 2013-04-08 18:36 UTC (permalink / raw)
  To: git; +Cc: Jeff King

Git 1.8.2.1 includes commit bd54cf17 - archive: handle commits with an empty tree

Test 2 of t5004-archive-corner-cases, "tar archive of empty tree is empty", fails on Mac OS X 10.8.3 (with XCode 4.6.1) since the tar command exits with return code 1 on the generated  tar file.

expecting success: 
	git archive --format=tar HEAD >empty.tar &&
	make_dir extract &&
	"$TAR" xf empty.tar -C extract &&
	check_dir extract

tar: Damaged tar archive
tar: Error exit delayed from previous errors.
not ok 2 - tar archive of empty tree is empty

tar tf "trash directory.t5004-archive-corner-cases/empty.tar"; echo $?
tar: Damaged tar archive
tar: Error exit delayed from previous errors.
1

tar --version
bsdtar 2.8.3 - libarchive 2.8.3

It appears that bsdtar does not like the empty tar files created by git archive. An empty tar file created by bsdtar is accepted.

tar cT /dev/null | tar t; echo $?
0

-- 

BJ Hargrave

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-04-10 17:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-08 18:36 tar on Mac does not like empty tar from git archive BJ Hargrave
2013-04-08 21:05 ` Jeff King
2013-04-08 22:07   ` BJ Hargrave
2013-04-09 19:37   ` René Scharfe
2013-04-10 17:00 ` René Scharfe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).