git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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é

Previous: fuz@fuz.suNext: fuz@fuz.su
Message 2 of 9 in “git archive should use vendor extension in pax header”
  1. fuz@fuz.suJan 24, 2016
  2. René ScharfeJan 26, 2016
  3. fuz@fuz.suJan 27, 2016
  4. fuz@fuz.suJan 27, 2016
  5. Johannes SchindelinJan 28, 2016
  6. fuz@fuz.suJan 28, 2016
  7. René ScharfeFeb 6, 2016
  8. fuz@fuz.suFeb 6, 2016
  9. René ScharfeFeb 15, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.