Re: cgit, ages and chronological order

From: Warner Losh <imp_at_bsdimp.com>
Date: Thu, 18 Nov 2021 16:46:50 UTC
On Thu, Nov 18, 2021 at 9:29 AM Brooks Davis <brooks@freebsd.org> wrote:

> On Thu, Nov 18, 2021 at 12:46:49PM +0800, Philip Paeps wrote:
> > On 2021-11-17 06:32:52 (+0800), Mark Millard via freebsd-git wrote:
> > > information being based on local git commit timing (and clocks)
> > > vs. when the commits are pushed to FreeBSD servers: The display
> > > order is from the timing on the FreeBSD servers but the Age is
> > > based on the original commit (before the push). The longer the
> > > delay between commit and push, the more noticeable the
> > > distinction is.
> >
> > Some projects require a "git rebase --ignore-date" (or "git rebase
> > --reset-author-date", which I consider the more obvious spelling) before
> > pushing.  A hook could potentially reject commits with timestamps that
> > are too far off to the server's liking.
> >
> > I can't comment on whether we need or want either the policy or the hook
> > or both.  I don't really have a problem with the default Git behaviour
> > here.
>
> I always use --ignore-date when curating pre-commit.  I'd like to at
> an absolute minimum enforce that CommitDate be newer than the previous
> commit and older than the push time.  There is no good argument for
> allowing non-linear CommitDates since the only requirement is that the
> committer have their clock set more or less correctly.
>

At the very least, we should document this suggestion.

I also like the idea of enforcing this as a pre-commit hook, but before that
we should have it the docs... wouldn't hurt to have a section in the docs
about each of the major points we enforce to tell people have to fix
the issue should they encounter it.

Warner