blame: handle broken commit headers gracefully
authorRené Scharfe <redacted>
Wed, 17 Apr 2013 18:33:54 +0000 (20:33 +0200)
committerJunio C Hamano <redacted>
Wed, 17 Apr 2013 21:50:45 +0000 (14:50 -0700)
commitde5abe9fe91a496d019d62abefe23df9d72fad30
treeb7e96cb9f56afd1b82ad9a610c033f56254fc558
parent9dbe7c3d7f4424cf0c27c2d4efabf72e58fa76b9
blame: handle broken commit headers gracefully

split_ident_line() can leave us with the pointers date_begin, date_end,
tz_begin and tz_end all set to NULL.  Check them before use and supply
the same fallback values as in the case of a negative return code from
split_ident_line().

The "(unknown)" is not actually shown in the output, though, because it
will be converted to a number (zero) eventually.

Signed-off-by: Rene Scharfe <redacted>
Signed-off-by: Junio C Hamano <redacted>
builtin/blame.c
git clone https://git.99rst.org/PROJECT