git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Passing tar(1) options via git-archive(1)
@ 2014-09-23 18:57 Daniel Brockman
  2014-09-23 21:49 ` Thomas Braun
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Brockman @ 2014-09-23 18:57 UTC (permalink / raw)
  To: git

Some background from the git-archive(1) man page:

    git-archive behaves differently when given a tree ID versus when
    given a commit ID or tag ID.  In the first case the current time is
    used as the modification time of each file in the archive.  In the
    latter case the commit time as recorded in the referenced commit
    object is used instead.

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)?

Thanks,
Daniel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-24  5:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-23 18:57 Passing tar(1) options via git-archive(1) Daniel Brockman
2014-09-23 21:49 ` Thomas Braun
2014-09-24  0:15   ` brian m. carlson
2014-09-24  1:26     ` Daniel Brockman
2014-09-24  5:46       ` Jeff King

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).