Re: [PATCH] blame: handle broken commit headers gracefully

2013-04-18 Thread Jeff King
On Wed, Apr 17, 2013 at 02:55:29PM -0700, Junio C Hamano wrote: > Or you can imagine nastier input strings, like > >Name <>- 123456789 - >Name - 123456789 - >Name 56789 - > > I am afraid that at some point "we should salvage as much as we > can", which is a worthy goal, b

Re: [PATCH] blame: handle broken commit headers gracefully

2013-04-17 Thread Junio C Hamano
Jeff King writes: > On Wed, Apr 17, 2013 at 08:33:54PM +0200, René Scharfe wrote: > >> Minimal patch, test case missing. It's a bit sad that the old commit >> parser of blame handled Ivan's specific corruption (extra "-<>" after >> email) gracefully because it used the spaces as cutting points i

Re: [PATCH] blame: handle broken commit headers gracefully

2013-04-17 Thread René Scharfe
Am 17.04.2013 23:07, schrieb Jeff King: On Wed, Apr 17, 2013 at 08:33:54PM +0200, René Scharfe wrote: Minimal patch, test case missing. It's a bit sad that the old commit parser of blame handled Ivan's specific corruption (extra "-<>" after email) gracefully because it used the spaces as cutti

Re: [PATCH] blame: handle broken commit headers gracefully

2013-04-17 Thread Jeff King
On Wed, Apr 17, 2013 at 08:33:54PM +0200, René Scharfe wrote: > Minimal patch, test case missing. It's a bit sad that the old commit > parser of blame handled Ivan's specific corruption (extra "-<>" after > email) gracefully because it used the spaces as cutting points instead > of "<" and ">".

[PATCH] blame: handle broken commit headers gracefully

2013-04-17 Thread René Scharfe
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, bec