Re: get_maintainer.pl and .mailmap entries with more than 2 addresses

From: Junio C Hamano
Date: Tue Aug 02 2016 - 14:18:53 EST


Joe Perches <joe@xxxxxxxxxxx> writes:

> Hello Florian.
>
> There is at least an oddity with get_maintainer handling of a
> .mailmap entry form.
>
> For instance:
>
> Mauro's .mailmap entry is:
> Mauro Carvalho Chehab <mchehab@xxxxxxxxxx> <maurochehab@xxxxxxxxx> <mchehab@xxxxxxxxxxxxx> <mchehab@xxxxxxxxxx> <m.chehab@xxxxxxxxxxx> <mchehab@xxxxxxxxxxxxxxx> <mchehab@xxxxxxxxxxxxxxxx>
>
> Is this a valid form?

I do not think so, according to "git shortlog --help" (the canonical
source of the document is Documentation/mailmap.txt, but shortlog
doc includes it). Here is the relevant bits.

In the simple form, each line in the file consists of the canonical
real name of an author, whitespace, and an email address used in the
commit (enclosed by '<' and '>') to map to the name. For example:
--
Proper Name <commit@xxxxxxxx>
--

The more complex forms are:
--
<proper@xxxxxxxx> <commit@xxxxxxxx>
--
which allows mailmap to replace only the email part of a commit, and:
--
Proper Name <proper@xxxxxxxx> <commit@xxxxxxxx>
--
which allows mailmap to replace both the name and the email of a
commit matching the specified commit email address, and:
--
Proper Name <proper@xxxxxxxx> Commit Name <commit@xxxxxxxx>
--
which allows mailmap to replace both the name and the email of a
commit matching both the specified commit name and email address.