Re: git push hook to check for outdated timestamps

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: git push hook to check for outdated timestamps
Date: 2015-06-12 14:33:10
Message-ID: 12287.1434119590@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 06/12/2015 09:31 AM, Robert Haas wrote:
>> Could we update our git hook to refuse a push of a new commit whose
>> timestamp is more than, say, 24 hours in the past? Our commit history
>> has some timestamps in it now that are over a month off, and it's
>> really easy to do, because when you rebase a commit, it keeps the old
>> timestamp. If you then merge or cherry-pick that into an official
>> branch rather than patch + commit, you end up with this problem unless
>> you are careful to fix it by hand. It would be nice to prevent
>> further mistakes of this sort, as they create confusion.

> I think 24 hours is probably fairly generous,

Yeah ... if we're going to try to enforce a linear-looking history, ISTM
the requirement ought to be "newer than the latest commit on the same
branch". Perhaps that would be unduly hard to implement though.

FWIW, our git_changelog script tries to avoid this problem by paying
attention to CommitDate not Date. But I agree that it's confusing when
those fields are far apart.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2015-06-12 15:56:54 Re: The purpose of the core team
Previous Message Andrew Dunstan 2015-06-12 14:22:48 Re: git push hook to check for outdated timestamps