Thread (9 messages) 9 messages, 3 authors, 2016-06-15

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

flat view

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:52:57

Possibly related (same subject, not in this thread)

On Sun, Feb 5, 2012 at 1:20 AM, Jeff King [off-list ref] wrote:
On Sat, Feb 04, 2012 at 09:30:42PM +0200, Felipe Contreras wrote:
quoted
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help