Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Nov 2021 09:37:57 -0500
From:      Marc Branchaud <marcnarc@gmail.com>
To:        Warner Losh <imp@bsdimp.com>, Brooks Davis <brooks@freebsd.org>
Cc:        Philip Paeps <philip@freebsd.org>, Mark Millard <marklmi@yahoo.com>, Ulrich Sp??rlein <uqs@freebsd.org>, Graham Perrin <grahamperrin@gmail.com>, freebsd-git <freebsd-git@freebsd.org>
Subject:   Re: cgit, ages and chronological order
Message-ID:  <58e89a2f-f53e-1b41-138f-e2d0fd536a28@gmail.com>
In-Reply-To: <CANCZdfrWT1OxgK3T2b-5R8wD2rBJ41wdYwx8iDdh=VSWvzcEqQ@mail.gmail.com>
References:  <9766b3e1-fb5d-1993-46e2-057e2567315a@gmail.com> <CAJ9axoT6kEwC%2Bt5zHSKPSFgFmaOt8-CXPAG5jsanWobT4LZhpA@mail.gmail.com> <36020FD7-32A4-4869-B6A2-2622F50F6478@yahoo.com> <FFB55106-BA73-4639-9772-0B3608B3E8DC@freebsd.org> <20211118162927.GG81740@spindle.one-eyed-alien.net> <CANCZdfrWT1OxgK3T2b-5R8wD2rBJ41wdYwx8iDdh=VSWvzcEqQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2021-11-18 11:46, Warner Losh wrote:
> 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.

A Git alias could be a useful recommendation here, eg. to create a "git 
rb" command that does a rebase with the desired option:

	git config --add alias.rb 'rebase --ignore-date'

(Add --local to make Git only configure the alias for your FreeBSD clone.)

I think maybe you can even create a "rebase" alias that overlays the 
real "rebase" Git command, but I'm not 100% sure of that (I don't like 
to mask the real Git commands with my aliases, so I've never tried).

		M.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58e89a2f-f53e-1b41-138f-e2d0fd536a28>