From: Junio C Hamano Date: Fri, 12 Jul 2013 20:38:13 GMT Subject: Re: Bug in .mailmap handling? Message-ID: <7v8v1bjyyy.fsf@alter.siamese.dyndns.org> In-Reply-To: <7vfvvjjzee.fsf@alter.siamese.dyndns.org> Junio C Hamano writes: > Stefan Beller writes: > >> git shortlog -sne >> 1 A >> 1 A > > This is coming from mailmap.c::add_mapping() that downcases the > e-mail address. > > changed_email@example.org is mapped to a@example.org because of this > downcasing, while "A " does not have any entry for it > in the .mailmap file, so it is given back as-is. Hence we see two > distinct entries. I think it is wrong for the parser to lose information by downcasing. It is perfectly fine to do the comparison case insensitively, to allow in the input is mangled using the entry for in the .mailmap file; it is not fine to downcase the parsed result, especially the side that is used as the "rewritten result" (i.e. the tokens earlier on the line), as that would mean mangling the output. Let me see if I can quickly whip up a fix.