On Tue, Sep 23, 2014 at 11:49:24PM +0200, Thomas Braun wrote: > Am 23.09.2014 um 20:57 schrieb Daniel Brockman: > > Would it make sense to add an --mtime option to git-archive(1) to enable > > explicitly setting the mtime for all files in the archive? It could > > just pass through to the tar(1) --mtime option. > > > > My use case is `git archive HEAD | docker build -`, in which the Docker > > cache is prevented from working because the mtime keeps getting bumped > > on all files. I would like to have the mtime always be the same. > > > > See, e.g., <https://github.com/deis/deis/issues/1334>. > > > > Otherwise, how about a generic way to pass options to tar(1)? > > Actually I wanted to just hint to TAR_OPTIONS > as in > TAR_OPTIONS="--mtime 2014-09-23\ 00:00" git archive -o ausg.tar HEAD > but that does not work here (on windows). 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. -- brian m. carlson / brian with sandals: Houston, Texas, US +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Attachment:
signature.asc
Description: Digital signature