Re: git archive should use vendor extension in pax header
- From
René Scharfe <l.s.r@web.de>
- Date
- Jan 26, 2016, 22:06 UTC
- Message-ID
- <56A7EDE1.1020909@web.de>
- In-Reply-To
- <20160124155909.GA16847@fuz.su>
Am 24.01.2016 um 16:59 schrieb fuz@fuz.su:
Show 8 quoted lines
> Right now, git archive creates a pax global header of the form > > comment=57ca140635bf157354124e4e4b3c8e1bde2832f1 > > in tar archives it creates. This is suboptimal as as comments are > specified to be ignored by extraction software. It is impossible to > find out in an automatic way (short of guessing) that this is supposed > to be a commit hash.
This is only a problem if you don't know how a given tar files was created (or modified later). How did you get into this situation? Or in other words: Please tell me more about your use case.
Show 5 quoted lines
> It would be much more useful if git created a > custom key. As per POSIX suggestions, something like this would be > appropriate: > > GIT.commit=57ca140635bf157354124e4e4b3c8e1bde2832f1
This would be included in addition to the comment in order to avoid breaking existing users, I guess.
If you have a random archive and want to know if it was generated by git then your next question might be which options and substitutions were used. That reminds me of this thread regarding verifiable archives:
http://article.gmane.org/gmane.comp.version-control.git/240244
Thanks, René