git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
René Scharfe <rene.scharfe@lsrfire.ath.cx>
Date
Apr 17, 2013, 21:22 UTC
Message-ID
<516F12A1.9050106@lsrfire.ath.cx>
In-Reply-To
<20130417210713.GB635@sigill.intra.peff.net>
Am 17.04.2013 23:07, schrieb Jeff King:
Show 19 quoted lines
> 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 ">".
>
> That may mean there is room for improvement in split_ident_line to
> be more resilient in removing cruft. With something like:
>
>    Name <email@host>-<> 123456789 -0000
>
> it would obviously be nice to find the date timestamp there, but I
> wonder what the "email" field should return? The full broken string, or
> just "email@host"? One way is convenient for overlooking problems in
> broken commits, but I would worry about code paths that are using
> split_ident_line to verify the quality of the string (like
> determine_author_info). It's possible we would need a strict and a
> forgiving mode.

You can have both; the necessary data is in the struct ident_split: Just check that *mail_end == '>' and mail_end + 1 == date_begin etc.

René
Previous: Jeff KingNext: Junio C Hamano
Message 23 of 28 in “git log - crash and core dump”
  1. Ivan LyapunovApr 16, 2013
  2. Antoine PelisseApr 16, 2013
  3. René ScharfeApr 16, 2013
  4. Junio C HamanoApr 16, 2013
  5. René ScharfeApr 16, 2013
  6. Junio C HamanoApr 16, 2013
  7. Ivan LyapunovApr 17, 2013
  8. Ivan LyapunovApr 17, 2013
  9. John KeepingApr 17, 2013
  10. Ivan LyapunovApr 17, 2013
  11. Konstantin KhomoutovApr 17, 2013
  12. Junio C HamanoApr 17, 2013
  13. Jeff KingApr 17, 2013
  14. Junio C HamanoApr 17, 2013
  15. René ScharfeApr 17, 2013
  16. Jeff KingApr 17, 2013
  17. René ScharfeApr 17, 2013
  18. cat-file: print tags raw for "cat-file -p"Jeff King, Apr 17, 2013
  19. Eric SunshineApr 19, 2013
  20. pretty: handle broken commit headers gracefullyRené Scharfe, Apr 17, 2013
  21. blame: handle broken commit headers gracefullyRené Scharfe, Apr 17, 2013
  22. Jeff KingApr 17, 2013
  23. René ScharfeApr 17, 2013
  24. Junio C HamanoApr 17, 2013
  25. Jeff KingApr 18, 2013
  26. Antoine PelisseApr 16, 2013
  27. Jeff KingApr 16, 2013
  28. Ivan LyapunovApr 17, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.