Vivien Kraus wrote:
> > 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?

In this situation, the files are no longer under version control;
therefore vc_mtime(F) is the mtime of F on disk.

Extracting a tar or zip file produces, on disk, the mtimes that were
recorded in the archive. Which mtimes these are, depends on the
tool that was used to produced the archive.

> 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.

I don't see 'git-version-gen' as "closely related" to vc-mtime.

And the Gnulib documentation says that .tarball-version should be included
in distribution tarballs. If you don't use "make dist" to create such
distribution tarballs (presumably because you aren't using the GNU BUild
System), you need other means to do that than a Makefile.am rule.

> Would it make sense to search for a
> companion ".source-mtime" file next to the file of interest, or some
> meaningful name?

I don't see why. All you need to ensure is that in the tar or zip archive,
the mtimes are as desired. There are many ways to do that.

Bruno




Reply via email to