Tidying the DejaGnu Git repository (was: Fixing problems reported by "git fsck")

Jacob Bachmeyer <[email protected]> Thu, 30 Nov 2023 21:39:15 -0600
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <[email protected]>
[ANNOUNCEMENT:  Some (ancient) tags in the DejaGnu Git repository *will* 
change and/or move in the near future.]

Shahab Vahedi wrote:
> TL;DR;
> There are problems in internal structure of DejaGnu's git repo. A
> POSIX shell script is proposed at the end of this message that fixes
> them. During this fix, no commit is touched, so the history remains
> intact. Please continue reading for further details.
>   

I have been aware of these issues for some time and tidying the 
repository is on my TODO list.

> I have cloned DejaGnu's codebase from the official repo. When I
> wanted to push it to a Github account, it got rejected.

You should not be using GitHub anyway; it completely fails the GNU 
ethical repository criteria 
(<URL:http://www.gnu.org/software/repo-criteria.en.html>, 
<URL:http://www.gnu.org/software/repo-criteria-evaluation.html>) because 
the site is almost completely nonfunctional without running nonfree 
JavaScript.  As such, "GitHub does not like this" is NOTABUG; it is 
completely irrelevant to GNU development.

That said, the tags in question seem to have been generated as part of a 
long-ago import from CVS and, in fact, contain no timestamp at all, 
which apparently causes newer Git (which is Free Software and therefore 
/is/ relevant here) to complain and spuriously assume that the timestamp 
is the epoch time of zero.  Older versions of Git accepted these tags 
without complaint, but newer versions (I am unsure exactly when the 
change was made) complain about the lack of a recorded timestamp for the 
tag itself.  I found this issue some time ago, but have been trying to 
decide what to do about it.  Thanks for the push to actually announce 
this, but the script offered would falsify the history by copying the 
commit timestamp to the tag, which is not necessarily true, as the tag 
was probably made after the commit.

I am planning to also somehow mark the tags in question as having come 
from CVS (zzz-old-CVS/* prefix?) and either move them off of the main 
history entirely (by creating null commits to hang the tags on, which 
would also provide a place (the commit message) to record what was done 
and why), introduce "relbase" tags at the branch points for each release 
that was made from the Git repository, or possibly both.  I find the 
current behavior of Savannah, in reporting (at dejagnu-commit) the 
location of master relative to the ancient dejagnu_1_4_3 tag less than 
optimal.  I expect that removing the imported tags from mainline, 
putting more recent tags on mainline, or both of those would help with that.

There are also a number of obsolete branches that should probably be 
converted to tags or simply removed if (as I suspect) they currently 
point to tagged commits for past DejaGnu releases.

Any comments on this from the mailing list before I start altering some 
of the repository index metadata?


-- Jacob