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

Re: Passing tar(1) options via git-archive(1)

From
DBDaniel Brockman <daniel@brockman.se>
Date
Sep 24, 2014, 01:26 UTC
Message-ID
<87k34tizb5.fsf@brockman.se>
In-Reply-To
<20140924001522.GB6920@vauxhall.crustytoothpaste.net>
"brian m. carlson" <sandals@crustytoothpaste.net> writes:
> Git does not invoke tar(1).  It has its own tar (actually, pax)
> implementation, so any options would have to be implemented in Git.
> We'd probably want to make such a change effective in the zip format
> as well.
Ah, I see...
Well, I guess in the meantime I'll just do this:
   git commit -m dummy --allow-empty --date=1970-01-01T00:00:00Z
   git archive HEAD | docker build -
   git reset HEAD~
Or even (slightly more atomically) this:
   git archive HEAD | { tmpdir=`mktemp -d` && tar x -C"$tmpdir" &&
     tar c -C"$tmpdir" --mtime=1970-01-01T00:00:00Z . &&
     rm -r "$tmpdir"; } | docker build -
Previous: brian m. carlsonNext: Jeff King
Message 4 of 5 in “Passing tar(1) options via git-archive(1)”
  1. Daniel BrockmanSep 23, 2014
  2. Thomas BraunSep 23, 2014
  3. brian m. carlsonSep 24, 2014
  4. Daniel BrockmanSep 24, 2014
  5. Jeff KingSep 24, 2014

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.