Re: Timestamp of zero in reflog considered invalid
- From
- Erik Bray <erik.m.bray@gmail.com>
- Date
- Apr 6, 2016, 13:20 UTC
- Message-ID
- <CAOTD34Z-tJ4-aB7uMy5Hw9D3_N+EOwHsqJ6F+cJ5yHZZzowjug@mail.gmail.com>
- In-Reply-To
- <xmqqbn5o2gv1.fsf@gitster.mtv.corp.google.com>
On Tue, Apr 5, 2016 at 5:52 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Thanks for a report.
Thanks for looking into it!
Show 6 quoted lines
> I think this dates back to 883d60fa (Sanitize for_each_reflog_ent(), > 2007-01-08): > > commit 883d60fa97c6397450fb129634054e0a6101baac > Author: Johannes Schindelin <Johannes.Schindelin@gmx.de> > Date: Mon Jan 8 01:59:54 2007 +0100
Ah yes, I tracked it to this too--forgot to mention that, sorry.
> I suspect that there was some > confusion as to how strtoul() signals an error condition when the > commit was written, or something.
Yep--the next line *did* check for (!message) which would indicate that strtoul failed, but checking for errno==ERANGE sounds good. +1 on the patch modulo setting errno = 0 first.
Thanks, Erik