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

Re: [bug] blame duplicates trailing ">" in mailmapped emails

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Feb 5, 2012, 21:11 UTC
Message-ID
<CAMP44s0xmvjxsE6AYrA5qTZuDfWq8vPDPOo69hiRS+xWbsbS7g@mail.gmail.com>
In-Reply-To
<20120204232015.GB1170@sigill.intra.peff.net>
On Sun, Feb 5, 2012 at 1:20 AM, Jeff King <peff@peff.net> wrote:
Show 16 quoted lines
> On Sat, Feb 04, 2012 at 09:30:42PM +0200, Felipe Contreras wrote:
>
>> > but it feels like the fix should go into map_user.  I tried a few things,
>> > like "git log -1 --format=%aE", and couldn't find other code paths with
>> > this problem. So presumably they are all feeding email addresses without
>> > the closing ">" (so one option is to just say "map_user needs to get
>> > NUL-terminated strings).
>>
>> Perhaps, but I though the idea was to make it efficient. I think the
>> above fix should be ok.
>
> Because of the calling convention of map_user, the buffer with the input
> must also be writable (since it holds the result). So there should be no
> loss of efficiency to convert the ">" into a "\0" (and in fact, the
> simplest fix is probably to just have map_user "tie off" any ">" it
> detects).

Yes, but then the caller (git blame) would need to _always_ do that conversion before (">" -> "\0"), and after ("\0" -> ">"), as opposed to now, that it does the conversion only when map_user succeeds (or checks if it has to do it).

-- 
Felipe Contreras
Previous: Jeff KingNext: Jeff King
Message 17 of 38 in “completion: couple of cleanups”
  1. 0/4 completion: couple of cleanupsFelipe Contreras, Feb 2, 2012
  2. Jonathan NiederFeb 2, 2012
  3. Felipe ContrerasFeb 2, 2012
  4. Thomas RastFeb 2, 2012
  5. Jonathan NiederFeb 2, 2012
  6. Jonathan NiederFeb 2, 2012
  7. Felipe ContrerasFeb 2, 2012
  8. Junio C HamanoFeb 2, 2012
  9. Felipe ContrerasFeb 2, 2012
  10. Junio C HamanoFeb 3, 2012
  11. Felipe ContrerasFeb 3, 2012
  12. Junio C HamanoFeb 3, 2012
  13. Felipe ContrerasFeb 4, 2012
  14. [bug] blame duplicates trailing ">" in mailmapped emailsJeff King, Feb 4, 2012
  15. Felipe ContrerasFeb 4, 2012
  16. Jeff KingFeb 4, 2012
  17. Felipe ContrerasFeb 5, 2012
  18. Jeff KingFeb 5, 2012
  19. Junio C HamanoFeb 5, 2012
  20. Junio C HamanoFeb 5, 2012
  21. Jeff KingFeb 5, 2012
  22. Junio C HamanoFeb 6, 2012
  23. Jeff KingFeb 6, 2012
  24. Junio C HamanoFeb 6, 2012
  25. Junio C HamanoFeb 6, 2012
  26. Jeff KingFeb 6, 2012
  27. Felipe ContrerasFeb 6, 2012
  28. Junio C HamanoFeb 6, 2012
  29. Felipe ContrerasFeb 6, 2012
  30. Junio C HamanoFeb 5, 2012
  31. Jonathan NiederFeb 2, 2012
  32. Junio C HamanoFeb 2, 2012
  33. Jonathan NiederFeb 2, 2012
  34. Felipe ContrerasFeb 2, 2012
  35. Jonathan NiederFeb 2, 2012
  36. Felipe ContrerasFeb 2, 2012
  37. Jonathan NiederFeb 2, 2012
  38. Felipe ContrerasFeb 2, 2012

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.