Hello,

Le lundi 24 février 2025 à 19:10 +0100, Bruno Haible via Gnulib
discussion list a écrit :
> The "version-controlled modification time" vc_mtime(F) of a file F
>    is defined as:
>      - If F is under version control and not modified locally:
>        the time of the last change of F in the version control
> system.
>      - Otherwise: The modification time of F on disk.

How does that work if you are running from the extraction of a git
archive? According to https://git-scm.com/docs/git-archive, you can
pass:

--mtime=<time>
Set modification time of archive entries. Without this option the
committer time is used if <tree-ish> is a commit or tag, and the
current time if it is a tree.

So it appears that running git archive destroys the modification time,
right?

In a module I closely associate with this, git-version-gen, you can
have an escape hatch in the form of the ".tarball-version" file, so you
could insert a .tarball-version in the git archive and it would still
get the version correctly. Would it make sense to search for a
companion ".source-mtime" file next to the file of interest, or some
meaningful name?

Best regards,

Vivien

Reply via email to