(unknown)
- From
- Hin-Tak Leung <htl10@users.sourceforge.net>
- Date
- Aug 4, 2011, 17:27 UTC
- Message-ID
- <1312478843.69439.YahooMailClassic@web29510.mail.ird.yahoo.com>
--- On Thu, 4/8/11, Jeff King <peff@peff.net> wrote:
Show 16 quoted lines
> On Wed, Aug 03, 2011 at 11:17:59PM > +0100, Hin-Tak Leung wrote: > > > The summary of the problem is that, git-archive's > "--format=tar" > > option really write the pax format most of the time, > and some > > cross-platform archive extraction library (rather than > the > > all-powerful GNU tar) really does not think that's the > tar format and > > bail out. > > Out of curiosity, what is the library? Putting pax headers > into ustar > format has been standardized in POSIX since 2001.
The R people wrote their own in the R language (and the person who responded to my post in that R-devel thread was possibly the one who wrote that part, I believe) - The main reason is probably cross-platform-ness and independence from other programming languages - they are gradually moving away from invoking system() (because they need to run on windows and they used to require many cygwin/mingw tools to build add-on packages).
The R code which does that, scan for certain patterns after seek() into the gunzip'ed stream after 512(?) bytes. It is in a file R/src/library/utils/R/tar.R under the source repository.
Show 18 quoted lines
> That header contains useful information (the commit id from > which the > archive was generated). And there is a way to turn it off: > give a tree > id instead of a commit id. There is an example in the > git-archive > manpage that does exactly this already. Look for the > example mentioning > "pax header" here: > > http://www.kernel.org/pub/software/scm/git/docs/git-archive.html > > It might be a bit more obvious to find if we actually had > a > --no-pax-header option, though. > > -Peff >
I think I tried the tree example and the R code also didn't like it much... may be I'll give it another try.