Re: git log - crash and core dump
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 17, 2013, 05:26 UTC
- Message-ID
- <7vli8hhgmn.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <7vzjwyi0ba.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 13 quoted lines
> René Scharfe <rene.scharfe@lsrfire.ath.cx> writes: > >> How about making split_ident_line() a bit friendlier be letting it >> provide the epoch as default time stamp instead of NULL? > > Two knee-jerk concerns I have without going back to the callers: > > * Would that "0" ever be given to the approxidate parser, which > rejects ancient dates in numbers-since-epoch format without @ > prefix? > > * Does any existing caller use the NULL as a sign to see the input > was without date and act on that information?
I looked at all the callers (there aren't that many), and none of them did "Do this on a person-only ident, and do that on an ident with timestamp". So for the callers that ignore timestamp, your patch will be a no-op, and for others that assume there is a timestamp, it will turn a crash/segv into output with funny timestamp.
So I think the patch is a right thing to do (we would need in-code comment to warn new callers about the semantics, though).
Thanks.