Re: [HACKERS] git push hook to check for outdated timestamps

2015-07-14 Thread Peter Eisentraut
On 7/14/15 3:44 AM, Alvaro Herrera wrote: Peter Eisentraut wrote: On 6/25/15 8:08 PM, Robert Haas wrote: Because I don't want to have to do git log --format=fuller to see when the thing was committed, basically. Then I suggest to you the following configuration settings: [format]

Re: [HACKERS] git push hook to check for outdated timestamps

2015-07-14 Thread Alvaro Herrera
Peter Eisentraut wrote: On 7/14/15 3:44 AM, Alvaro Herrera wrote: I have been using a slightly tweaked version of this and I have found that the %w(80,4,4)%B thingy results in mangled formatting; I have since refined this to ... %n%n%w(0,4,4)%s%n%+b You might find that that works

Re: [HACKERS] git push hook to check for outdated timestamps

2015-07-14 Thread Alvaro Herrera
Peter Eisentraut wrote: On 6/25/15 8:08 PM, Robert Haas wrote: Because I don't want to have to do git log --format=fuller to see when the thing was committed, basically. Then I suggest to you the following configuration settings: [format] pretty=cmedium [pretty]

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-26 Thread Peter Eisentraut
On 6/25/15 8:08 PM, Robert Haas wrote: Because I don't want to have to do git log --format=fuller to see when the thing was committed, basically. Then I suggest to you the following configuration settings: [format] pretty=cmedium [pretty] cmedium=format:%C(auto,yellow)commit

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-26 Thread Robert Haas
On Fri, Jun 26, 2015 at 4:11 PM, Peter Eisentraut pete...@gmx.net wrote: On 6/25/15 8:08 PM, Robert Haas wrote: Because I don't want to have to do git log --format=fuller to see when the thing was committed, basically. Then I suggest to you the following configuration settings: [format]

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-25 Thread Robert Haas
On Wed, Jun 24, 2015 at 3:50 PM, Peter Eisentraut pete...@gmx.net wrote: On 6/24/15 12:55 PM, Robert Haas wrote: FWIW, I have been doing that, and I have not considered it a problem. If the patch was submitted three months ago, reviewed, and then committed unchanged, the date is what it is.

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-24 Thread Alvaro Herrera
Noah Misch wrote: On Sun, Jun 14, 2015 at 12:37:00PM +0200, Magnus Hagander wrote: Would we in that case want to enforce linearity *and* recent-ness, or just linearity? as in, do we care about the commit time even if it doesn't change the order? If a recency check is essentially free,

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-24 Thread Robert Haas
On Tue, Jun 23, 2015 at 10:15 PM, Noah Misch n...@leadboat.com wrote: That brings it back to the enforcing - would we want to enforce both those? May as well. AuthorDate is the main source of trouble. You would need to go out of your way (e.g. git filter-branch) to push an old CommitDate,

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-24 Thread Peter Eisentraut
On 6/12/15 9: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

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-24 Thread Noah Misch
On Wed, Jun 24, 2015 at 10:03:50AM -0400, Robert Haas wrote: On Tue, Jun 23, 2015 at 10:15 PM, Noah Misch n...@leadboat.com wrote: That brings it back to the enforcing - would we want to enforce both those? May as well. AuthorDate is the main source of trouble. You would need to go

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-24 Thread Robert Haas
On Wed, Jun 24, 2015 at 11:37 AM, Peter Eisentraut pete...@gmx.net wrote: On 6/12/15 9: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

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-24 Thread Peter Eisentraut
On 6/24/15 12:55 PM, Robert Haas wrote: FWIW, I have been doing that, and I have not considered it a problem. If the patch was submitted three months ago, reviewed, and then committed unchanged, the date is what it is. Also, when I cherry-pick a commit from master to a back branch, I keep the

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-23 Thread Noah Misch
On Sun, Jun 14, 2015 at 12:37:00PM +0200, Magnus Hagander wrote: On Fri, Jun 12, 2015 at 4:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.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

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-14 Thread Magnus Hagander
On Fri, Jun 12, 2015 at 4:33 PM, Tom Lane t...@sss.pgh.pa.us wrote: Andrew Dunstan and...@dunslane.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

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-12 Thread Andrew Dunstan
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

Re: [HACKERS] git push hook to check for outdated timestamps

2015-06-12 Thread Tom Lane
Andrew Dunstan and...@dunslane.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

[HACKERS] git push hook to check for outdated timestamps

2015-06-12 Thread Robert Haas
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