[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #60654] mdate.pl should use git modification times if possible
From: |
G. Branden Robinson |
Subject: |
[bug #60654] mdate.pl should use git modification times if possible |
Date: |
Fri, 21 May 2021 23:18:44 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0 |
URL:
<https://savannah.gnu.org/bugs/?60654>
Summary: mdate.pl should use git modification times if
possible
Project: GNU troff
Submitted by: gbranden
Submitted on: Sat 22 May 2021 03:18:42 AM UTC
Category: None
Severity: 3 - Normal
Item Group: Build/Installation
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
Our mdate.pl script uses file modification times from the file system. These
do not necessarily match the date of the last change to the file in git, and
frequently don't; for instance, if one is exploring git repo history with 'git
checkout' before returning to HEAD.
This leads to spurious differences being reported in generated man pages, and
possibly misleading content in our man pages--the modification time reported
in the man page footer is not the time the page was last changed in any
meaningful sense, but some ill-specified date probably close to the build time
of the distribution archive or package. (Admittedly, the use of the third
argument to .TH as a document modification date is a convention, but one
preponderantly attested in history over any alternative semantics for it, as
far as I know.)
At the same time, mdate.pl is part of the distribution archive and is expected
to be run from trees that are not git repositories.
So it should work in both cases.
There's more on this type of issue at
<https://stackoverflow.com/questions/2458042/restore-a-files-modification-time-in-git>,
including recipes for resetting the file mtime to the date of the most recent
commit.
I propose that we should either (1) have mdate.pl try to determine whether it
is in a git repository, and if so, to reset the mtimes before using them to
determine the date; or (2) provide a separate script that a person (probably a
developer working in a git tree) can invoke it before performing a build.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?60654>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #60654] mdate.pl should use git modification times if possible,
G. Branden Robinson <=