threads / discuss / 42986

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

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

## tl;dr

5 messages between Aug 2, 2016 and Aug 3, 2016.

replies: 4people: 4as markdown or json

Joe Perches· Aug 2, 2016, 16:36 UTC · lore
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@kernel.org> <maurochehab@gmail.com> <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com> <mchehab@osg.samsung.com> <mchehab@s-opensource.com>

Is this a valid form?
get_maintainer output for Mauro is:

$ ./scripts/get_maintainer.pl drivers/media/ -f Mauro Carvalho Chehab <mchehab@kernel.org> <maurochehab@gmail.com> <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com> <mchehab@osg.samsung.com> (maintainer:MEDIA INPUT INFRASTRUCTURE (V4L/DVB))

I believe the Mauro's and Shuah's .mailmap entries are improper and should be changed, but I'm not completely aware of git .mailmap handling and the documentation seems weakly specified.

https://git-scm.com/docs/git-check-mailmap
Maybe get_maintainer.pl needs a change or perhaps this patch
is  appropriate.
---
 .mailmap | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index c0d5704..c7f92ca 100644
--- a/.mailmap
+++ b/.mailmap
@@ -96,7 +96,12 @@ Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@web.de>
 Linus Lüssing <linus.luessing@c0d3.blue> <linus.luessing@ascom.ch>
 Mark Brown <broonie@sirena.org.uk>
 Matthieu CASTET <castet.matthieu@free.fr>
-Mauro Carvalho Chehab <mchehab@kernel.org> <maurochehab@gmail.com> <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com> <mchehab@osg.samsung.com> <mchehab@s-opensource.com>
+Mauro Carvalho Chehab <mchehab@kernel.org> <maurochehab@gmail.com>
+Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@infradead.org>
+Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@redhat.com>
+Mauro Carvalho Chehab <mchehab@kernel.org> <m.chehab@samsung.com>
+Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@osg.samsung.com>
+Mauro Carvalho Chehab <mchehab@kernel.org> <mchehab@s-opensource.com>
 Matt Ranostay <mranostay@gmail.com> Matthew Ranostay <mranostay@embeddedalley.com>
 Matt Ranostay <mranostay@gmail.com> <matt.ranostay@intel.com>
 Mayuresh Janorkar <mayur@ti.com>
@@ -132,7 +137,10 @@ Santosh Shilimkar <santosh.shilimkar@oracle.org>
 Sascha Hauer <s.hauer@pengutronix.de>
 S.Çağlar Onur <caglar@pardus.org.tr>
 Shiraz Hashim <shiraz.linux.kernel@gmail.com> <shiraz.hashim@st.com>
-Shuah Khan <shuah@kernel.org> <shuahkhan@gmail.com> <shuah.khan@hp.com> <shuahkh@osg.samsung.com> <shuah.kh@samsung.com>
+Shuah Khan <shuah@kernel.org> <shuahkhan@gmail.com>
+Shuah Khan <shuah@kernel.org> <shuah.khan@hp.com>
+Shuah Khan <shuah@kernel.org> <shuahkh@osg.samsung.com>
+Shuah Khan <shuah@kernel.org> <shuah.kh@samsung.com>
 Simon Kelley <simon@thekelleys.org.uk>
 Stéphane Witzmann <stephane.witzmann@ubpmes.univ-bpclermont.fr>
 Stephen Hemminger <shemminger@osdl.org>
Junio C Hamano· Aug 2, 2016, 18:16 UTC · re: Joe Perches · lore

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

Joe Perches <joe@perches.com> writes:
Show 11 quoted lines
> 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@kernel.org> <maurochehab@gmail.com> <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com> <mchehab@osg.samsung.com> <mchehab@s-opensource.com>
>
> 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@email.xx>
    --
    The more complex forms are:
    --
            <proper@email.xx> <commit@email.xx>
    --
    which allows mailmap to replace only the email part of a commit, and:
    --
            Proper Name <proper@email.xx> <commit@email.xx>
    --
    which allows mailmap to replace both the name and the email of a
    commit matching the specified commit email address, and:
    --
            Proper Name <proper@email.xx> Commit Name <commit@email.xx>
    --
    which allows mailmap to replace both the name and the email of a
    commit matching both the specified commit name and email address.
Joe Perches· Aug 2, 2016, 22:26 UTC · lore

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

On Wed, 2016-08-03 at 00:17 +0200, Florian Mickler wrote:
Show 56 quoted lines
> cc'd mchehab@s-opensource.com  (Mauro, is your kernel.org address up?)
> 
>  Am Tue, 02 Aug 2016 09:36:21 -0700
> schrieb Joe Perches <joe@perches.com>:
> 
> > 
> > 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@kernel.org> <maurochehab@gmail.com>
> > <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com>
> > <mchehab@osg.samsung.com> <mchehab@s-opensource.com>
> > 
> > Is this a valid form?
> > 
> > get_maintainer output for Mauro is:
> > 
> > $ ./scripts/get_maintainer.pl drivers/media/ -f
> > Mauro Carvalho Chehab <mchehab@kernel.org> <maurochehab@gmail.com>
> > <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com>
> > <mchehab@osg.samsung.com> (maintainer:MEDIA INPUT INFRASTRUCTURE
> > (V4L/DVB))
> > 
> > I believe the Mauro's and Shuah's .mailmap entries are improper and
> > should be changed, but I'm not completely aware of git .mailmap
> > handling and the documentation seems weakly specified.
> > 
> Hmm.. looking at Mauros last .mailmap commit it seems like your patch is
> ok for Mauro. 
> 
> Although <mywing81@gmail.com> and <mchehab@brturbo.com.br> are probably
> missing? (@Mauro) 
> 
> 
> $ git shortlog | grep "^Mauro C"
> Mauro Carvalho Chehab (4404):
> $ git log | grep "^Author:.*Mauro Carvalho Chehab" | sort | uniq -c
>       2 Author: Mauro Carvalho Chehab <maurochehab@gmail.com>
>     146 Author: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
>     645 Author: Mauro Carvalho Chehab <mchehab@infradead.org>
>     794 Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>    2015 Author: Mauro Carvalho Chehab <mchehab@redhat.com>
>     448 Author: Mauro Carvalho Chehab <m.chehab@samsung.com>
>     353 Author: Mauro Carvalho Chehab <mchehab@s-opensource.com>
>       1 Author: Mauro Carvalho Chehab <mywing81@gmail.com>
> 
> 
> 
> Anyway, from a technical viewpoint your patches seem to fix
> the .mailmap entry as the author intended. (See Junio's Email for the
> documantation part) 
> But I would wait for the ack from Mauro and Shuah. 

As far as I understand, a single entry with just their name and preferred email address would work too because the name parts are all spelled identically.

Shuah Khan· Aug 2, 2016, 23:11 UTC · re: Joe Perches · lore

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

On 08/02/2016 04:26 PM, Joe Perches wrote:
Show 63 quoted lines
> On Wed, 2016-08-03 at 00:17 +0200, Florian Mickler wrote:
>> cc'd mchehab@s-opensource.com  (Mauro, is your kernel.org address up?)
>>
>>  Am Tue, 02 Aug 2016 09:36:21 -0700
>> schrieb Joe Perches <joe@perches.com>:
>>
>>>
>>> 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@kernel.org> <maurochehab@gmail.com>
>>> <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com>
>>> <mchehab@osg.samsung.com> <mchehab@s-opensource.com>
>>>
>>> Is this a valid form?
>>>
>>> get_maintainer output for Mauro is:
>>>
>>> $ ./scripts/get_maintainer.pl drivers/media/ -f
>>> Mauro Carvalho Chehab <mchehab@kernel.org> <maurochehab@gmail.com>
>>> <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com>
>>> <mchehab@osg.samsung.com> (maintainer:MEDIA INPUT INFRASTRUCTURE
>>> (V4L/DVB))
>>>
>>> I believe the Mauro's and Shuah's .mailmap entries are improper and
>>> should be changed, but I'm not completely aware of git .mailmap
>>> handling and the documentation seems weakly specified.
>>>
>> Hmm.. looking at Mauros last .mailmap commit it seems like your patch is
>> ok for Mauro. 
>>
>> Although <mywing81@gmail.com> and <mchehab@brturbo.com.br> are probably
>> missing? (@Mauro) 
>>
>>
>> $ git shortlog | grep "^Mauro C"
>> Mauro Carvalho Chehab (4404):
>> $ git log | grep "^Author:.*Mauro Carvalho Chehab" | sort | uniq -c
>>       2 Author: Mauro Carvalho Chehab <maurochehab@gmail.com>
>>     146 Author: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
>>     645 Author: Mauro Carvalho Chehab <mchehab@infradead.org>
>>     794 Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>>    2015 Author: Mauro Carvalho Chehab <mchehab@redhat.com>
>>     448 Author: Mauro Carvalho Chehab <m.chehab@samsung.com>
>>     353 Author: Mauro Carvalho Chehab <mchehab@s-opensource.com>
>>       1 Author: Mauro Carvalho Chehab <mywing81@gmail.com>
>>
>>
>>
>> Anyway, from a technical viewpoint your patches seem to fix
>> the .mailmap entry as the author intended. (See Junio's Email for the
>> documantation part) 
>> But I would wait for the ack from Mauro and Shuah. 
> 
> As far as I understand, a single entry with just their
> name and preferred email address would work too because
> the name parts are all spelled identically.
> 
> 
I am fine with change to my entry. Thanks for fixing it.
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>

thanks, -- Shuah

Mauro Carvalho Chehab· Aug 3, 2016, 00:50 UTC · lore

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

Em Wed, 03 Aug 2016 00:17:10 +0200 Florian Mickler <florian@mickler.org> escreveu:

> cc'd mchehab@s-opensource.com  (Mauro, is your kernel.org address up?)

Yes, my kernel.org address is up. Better to keep it as the canonical address, as this is unlikely to change as it is not associated to an e-mail provider.

Show 36 quoted lines
> 
>  Am Tue, 02 Aug 2016 09:36:21 -0700
> schrieb Joe Perches <joe@perches.com>:
> 
> > 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@kernel.org> <maurochehab@gmail.com>
> > <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com>
> > <mchehab@osg.samsung.com> <mchehab@s-opensource.com>
> > 
> > Is this a valid form?
> > 
> > get_maintainer output for Mauro is:
> > 
> > $ ./scripts/get_maintainer.pl drivers/media/ -f
> > Mauro Carvalho Chehab <mchehab@kernel.org> <maurochehab@gmail.com>
> > <mchehab@infradead.org> <mchehab@redhat.com> <m.chehab@samsung.com>
> > <mchehab@osg.samsung.com> (maintainer:MEDIA INPUT INFRASTRUCTURE
> > (V4L/DVB))
> > 
> > I believe the Mauro's and Shuah's .mailmap entries are improper and
> > should be changed, but I'm not completely aware of git .mailmap
> > handling and the documentation seems weakly specified.
> >   
> 
> Hmm.. looking at Mauros last .mailmap commit it seems like your patch is
> ok for Mauro. 
> 
> Although <mywing81@gmail.com> and <mchehab@brturbo.com.br> are probably
> missing? (@Mauro) 

The mchehab@brturbo.com.br is indeed an old email that I used on my first submissions.

I don't know a mywing81@gmail.com address... that looks really weird on my eyes...

Hmm...
$ git log --author "mywing81@gmail.com"
commit fe8b671306c78a963934cb5d6e354178390b8c87
Author: Mauro Carvalho Chehab <mywing81@gmail.com>
Date:   Thu Sep 30 14:46:47 2010 -0300
    [media] saa7134: port Asus P7131 Hybrid to use the new rc-core
    
    The rc map table were corrected thanks to Giorgio input and tests.
    
    Reported-by: Giorgio Vazzana <mywing81@gmail.com>
    Tested-by: Giorgio Vazzana <mywing81@gmail.com>
    Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

I don't remember the dirty details about such patch anymore... too many years ago. From the custody chain, I _suspect_ that Giorgio proposed a patch to be applied against the saa7134 driver, but the remote controller map table was moved to a separate file about 7 months before such patch by those changesets:

6686fa6917ca V4L/DVB: Break Remote Controller keymaps into modules 77b7422d48cd V4L/DVB: ir-common: move IR tables from ir-keymaps.c to a separate file

I likely rewrote his patch against the new driver, but somehow
I mangled with the author name/email. In any case, mywing81@gmail.com
should not be associated with me.
 
Show 11 quoted lines
> <snip console research ... >
> $ git shortlog | grep "^Mauro C"
> Mauro Carvalho Chehab (4404):
> $ git log | grep "^Author:.*Mauro Carvalho Chehab" | sort | uniq -c
>       2 Author: Mauro Carvalho Chehab <maurochehab@gmail.com>
>     146 Author: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
>     645 Author: Mauro Carvalho Chehab <mchehab@infradead.org>
>     794 Author: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>    2015 Author: Mauro Carvalho Chehab <mchehab@redhat.com>
>     448 Author: Mauro Carvalho Chehab <m.chehab@samsung.com>
>     353 Author: Mauro Carvalho Chehab <mchehab@s-opensource.com>
All above are my e-mails. Let's point them all to mchehab@kernel.org.
>       1 Author: Mauro Carvalho Chehab <mywing81@gmail.com>

This one is mangled and doesn't belong to me. So, it shouldn't be at the .mailmap file.

Show 7 quoted lines
> </snip>
> 
> 
> Anyway, from a technical viewpoint your patches seem to fix
> the .mailmap entry as the author intended. (See Junio's Email for the
> documantation part) 
> But I would wait for the ack from Mauro and Shuah. 
With the above changes,
Acked-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

Thanks, Mauro

← back to recent threads