From: René Scharfe Date: Sat, 18 Feb 2023 08:36:23 +0000 (+0100) Subject: archive: add --mtime X-Git-Tag: v2.40.0-rc1~11^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fd2da4b1ea;p=thirdparty%2Fgit.git archive: add --mtime Allow users to specify the modification time of archive entries. The new option --mtime uses approxidate() to parse a time specification and overrides the default of using the current time for trees and the commit time for tags and commits. It can be used to create a reproducible archive for a tree, or to use a specific mtime without creating a commit with GIT_COMMITTER_DATE set. This implementation doesn't support the negated form of the new option, i.e. --no-mtime is not accepted. It is not possible to have no mtime at all. We could use the Unix epoch or revert to the default behavior, but since negation is not necessary for the intended use it's left undecided for now. Requested-by: Raul E Rangel Suggested-by: demerphq Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-archive.txt b/Documentation/git-archive.txt index 60c040988b..6bab201d37 100644 --- a/Documentation/git-archive.txt +++ b/Documentation/git-archive.txt @@ -86,6 +86,11 @@ cases, write an untracked file and use `--add-file` instead. Look for attributes in .gitattributes files in the working tree as well (see <>). +--mtime=