Re: Timestamp of zero in reflog considered invalid

2016-04-06 Thread Erik Bray
On Tue, Apr 5, 2016 at 5:52 PM, Junio C Hamano wrote: > Thanks for a report. Thanks for looking into it! > I think this dates back to 883d60fa (Sanitize for_each_reflog_ent(), > 2007-01-08): > > commit 883d60fa97c6397450fb129634054e0a6101baac > Author: Johannes Schindelin

Re: Timestamp of zero in reflog considered invalid

2016-04-06 Thread Johannes Schindelin
Hi Junio, On Tue, 5 Apr 2016, Junio C Hamano wrote: > Erik Bray writes: > > > I tracked the issue to refs/files-backend.c in show_one_reflog_ent : > > > > https://github.com/git/git/blob/11529ecec914d2f0d7575e6d443c2d5a6ff75424/refs/files-backend.c#L2923 > > > > in which

Re: Timestamp of zero in reflog considered invalid

2016-04-05 Thread Andreas Schwab
Junio C Hamano writes: > Checking the value against ULONG_MAX and errno==ERANGE would be an > improvement. It may be debatable if we should silently ignore an > entry with an invalid timestamp, but that is a separate issue. > > refs.c | 3 ++- > 1 file changed, 2

Re: Timestamp of zero in reflog considered invalid

2016-04-05 Thread Junio C Hamano
Erik Bray writes: > I tracked the issue to refs/files-backend.c in show_one_reflog_ent : > > https://github.com/git/git/blob/11529ecec914d2f0d7575e6d443c2d5a6ff75424/refs/files-backend.c#L2923 > > in which > > !(timestamp = strtoul(email_end + 2, , 10)) || > > implies an

Timestamp of zero in reflog considered invalid

2016-04-05 Thread Erik Bray
Hi all, I found this issue through a test suite for a Python git interface, which during the tests at some point sets GIT_COMMITTER_DATE=1970-01-01T00:00:00 To reproduce the issue: $ git init $ echo foo > testfile $ git add testfile $ git commit -m "test" $ echo bar >> testfile $ export