Subject: Re: [PATCH] mailmap: add an entry for Phillip Wood

From: Jeff King <[email-masked]>
Date: Tue, 20 Jan 2026 14:24:24 -0500

On Tue, Jan 20, 2026 at 10:26:55AM -0800, Junio C Hamano wrote:

> "Kristoffer Haugsbakk" <[email-masked]> writes:
> 
> > On Tue, Jan 20, 2026, at 12:01, Phillip Wood wrote:
> >> From: Phillip Wood <[email-masked]>
> >>
> >> While all my commits appear under the same address, other addresses
> >> appear in some commit trailers. Map those addresses to the canonical
> >> one.
> >>
> >> Signed-off-by: Phillip Wood <[email-masked]>
> >> ---
> >> I'm not sure if we actually remap the address in trailers but
> >> we've certainly talked about doing it in the past.
> >
> > Yeah it does.
> 
> Hmph, are you sure?  My quick experiment tells me that the trailers
> are not munged.
> 
>     $ git show --pretty=fuller -s | grep '@'
>     Author:     Patrick Steinhardt <[email-masked]>
>     Commit:     Junio C Hamano <[email-masked]>
>         Signed-off-by: Patrick Steinhardt <[email-masked]>
>         Signed-off-by: Junio C Hamano <[email-masked]>
>     $ cat >>.mailmap <<\EOF
>     Junio C Hamano <[email-masked]> <[email-masked]>
>     EOF
>     $ git show --pretty=fuller -s | grep '@'
>     Author:     Patrick Steinhardt <[email-masked]>
>     Commit:     Junio C Hamano <[email-masked]>
>         Signed-off-by: Patrick Steinhardt <[email-masked]>
>         Signed-off-by: Junio C Hamano <[email-masked]>

We do apply them in some places, like shortlog:

  $ cat >>.mailmap <<\EOF
  Junio C Hamano <[email-masked]> <[email-masked]>
  EOF
  $ git shortlog -1 -ne --group=trailer:signed-off-by 3f051fc9
  Junio C Hamano <[email-masked]> (1):
        doc: patch-id: --verbatim locks in --stable
  
  Kristoffer Haugsbakk <[email-masked]> (1):
        doc: patch-id: --verbatim locks in --stable

As you noted, we don't necessarily know that a given trailer represents
an ident. But we try to parse them as one (not just for mailmap, but for
stuff like "-e"), and if that doesn't work leave it as an opaque string.
That all comes from 56d5dde752 (shortlog: parse trailer idents,
2020-09-27).

I _thought_ we added support for %(trailers) to handle mailmap, too,
but...

> Or perhaps your "Yeah" is about "we've talkined about doing it"?

...yeah, I think this is the case. There's a proof of concept at:

  https://lore.kernel.org/git/[email-masked]/

but nobody ever took it further (I do still run with it as part of my
daily build, which probably enhanced my confusion ;) ).

-Peff