Skip to contentSkip to conversation

.mailmap: Update mailmap

PATCH In review Fangyi Zhou 6 participants 13 messages Sep 10, 2021 – Sep 13, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 .mailmap: Update mailmap

Similar to a35b13fce0 (Update .mailmap, 2018-11-09).

This patch makes the output of git shortlog -nse v2.10.0..master duplicate-free by taking/guessing the current and preferred addresses for authors that appear with more than one address.

Updated from <[email protected]>, taking into consideration of <[email protected]>, and other replies.

Use the by far most common e-mail address:
* Brandon Williams
* Jiang Xin

Use the most recent e-mail address:
* Birger Skogeng Pedersen
* Christopher Díaz Riveros
* Ed Maste
* Fangyi Zhou
* Jean-Noël Avila
* Kevin Willford
* Peter Kaestle

Use the one from their "Signed-off-by":
* Damien Robert
* Kazuhiro Kato
* Sibi Siddharthan

Use the most recent name / name with correct accents:
* CB Bailey
* Christopher Díaz Riveros
* Jessica Clarke
* Slavica Đukić

Do not merge:
* Andreas Schwab

---
Please let me know if you approve those changes or not. If no reply is received, the entry will be added in comments.

---
 .mailmap | 23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)
.mailmap +21 -2
index 9c6a446bdf..ff0887d9e0 100644
@@ -27,13 +27,16 @@ Ben Peart <[email protected]> <[email protected]>
 Ben Walton <[email protected]> <[email protected]>
 Benoit Sigoure <[email protected]> <[email protected]>
 Bernt Hansen <[email protected]> <[email protected]>
+Birger Skogeng Pedersen <[email protected]> <[email protected]>
 Brandon Casey <[email protected]> <[email protected]>
 Brandon Williams <[email protected]> <[email protected]>
+Brandon Williams <[email protected]> <[email protected]>
 brian m. carlson <[email protected]>
 brian m. carlson <[email protected]> <[email protected]>
 brian m. carlson <[email protected]> <[email protected]>
 Bryan Larsen <[email protected]> <[email protected]>
 Bryan Larsen <[email protected]> <[email protected]>
+CB Bailey <[email protected]> Charles Bailey
 Cheng Renquan <[email protected]>
 Chris Shoemaker <[email protected]>
 Chris Wright <[email protected]> <[email protected]>
@@ -41,10 +44,12 @@ Christian Ludwig <[email protected]> <[email protected]>
 Cord Seele <[email protected]> <[email protected]>
 Christian Couder <[email protected]> <[email protected]>
 Christian Stimming <[email protected]> <[email protected]>
-Christopher Díaz Riveros <[email protected]> Christopher Diaz Riveros
+Christopher Díaz Riveros <[email protected]> <[email protected]>
+Christopher Díaz Riveros <[email protected]> Christopher Diaz Riveros
 Clemens Buchacher <[email protected]> <[email protected]>
 Clemens Buchacher <[email protected]> <[email protected]>
 Csaba Henk <[email protected]> <[email protected]>
+Damien Robert <[email protected]> <[email protected]>
 Dan Johnson <[email protected]>
 Dana L. How <[email protected]> <[email protected]>
 Dana L. How <[email protected]> Dana How
@@ -64,13 +69,15 @@ Derrick Stolee <[email protected]> Derrick Stolee via GitGitGadget <gitgitga
 Deskin Miller <[email protected]>
 Đoàn Trần Công Danh <[email protected]> Doan Tran Cong Danh
 Dirk Süsserott <[email protected]>
+Ed Maste <[email protected]> <[email protected]>
 Eric Blake <[email protected]> <[email protected]>
 Eric Hanchrow <[email protected]> <[email protected]>
 Eric S. Raymond <[email protected]>
 Eric Wong <[email protected]> <[email protected]>
 Erik Faye-Lund <[email protected]> <[email protected]>
 Eyvind Bernhardsen <[email protected]> <[email protected]>
-Fangyi Zhou <[email protected]> Zhou Fangyi
+Fangyi Zhou <[email protected]> <[email protected]>
+Fangyi Zhou <[email protected]> Zhou Fangyi <[email protected]>
 Florian Achleitner <[email protected]> <[email protected]>
 Franck Bui-Huu <[email protected]> <[email protected]>
 Frank Lichtenheld <[email protected]> <[email protected]>
@@ -102,11 +109,14 @@ Jason Riedy <[email protected]> <[email protected]>
 Jay Soffian <[email protected]> <[email protected]>
 Jean-Noël Avila <[email protected]> Jean-Noel Avila
 Jean-Noël Avila <[email protected]> Jean-Noël AVILA
+Jean-Noël Avila <[email protected]> Jean-Noel Avila <[email protected]>
 Jeff King <[email protected]> <[email protected]>
 Jeff Muizelaar <[email protected]> <[email protected]>
 Jens Axboe <[email protected]> <[email protected]>
 Jens Axboe <[email protected]> <[email protected]>
 Jens Lindström <[email protected]> Jens Lindstrom <[email protected]>
+Jessica Clarke <[email protected]> James Clarke
+Jiang Xin <[email protected]> <[email protected]>
 Jim Meyering <[email protected]> <[email protected]>
 Joachim Berdal Haga <[email protected]>
 Joachim Jablon <[email protected]> <[email protected]>
@@ -138,10 +148,12 @@ Karsten Blees <[email protected]> <[email protected]>
 Karsten Blees <[email protected]> <[email protected]>
 Kay Sievers <[email protected]> <[email protected]>
 Kay Sievers <[email protected]> <kay@mam.(none)>
+Kazuhiro Kato <[email protected]> <[email protected]>
 Kazuki Saitoh <[email protected]> kazuki saitoh <[email protected]>
 Keith Cascio <[email protected]> <[email protected]>
 Kent Engstrom <[email protected]>
 Kevin Leung <[email protected]>
+Kevin Willford <[email protected]> <[email protected]>
 Kirill Smelkov <[email protected]> <[email protected]>
 Kirill Smelkov <[email protected]> <[email protected]>
 Knut Franke <[email protected]> <[email protected]>
@@ -211,6 +223,7 @@ Peter Baumann <[email protected]> <[email protected]
 Peter Baumann <[email protected]> <[email protected]>
 Peter Krefting <[email protected]> <[email protected]>
 Peter Krefting <[email protected]> <[email protected]>
+Peter Kaestle <[email protected]> <[email protected]>
 Petr Baudis <[email protected]> <[email protected]>
 Petr Baudis <[email protected]> <xpasky@machine>
 Phil Hord <[email protected]> <[email protected]>
@@ -242,9 +255,11 @@ Sebastian Schuberth <[email protected]> <[email protected]>
 Seth Falcon <[email protected]> <[email protected]>
 Shawn O. Pearce <[email protected]>
 Wei Shuyu <[email protected]> Shuyu Wei
+Sibi Siddharthan <[email protected]> <[email protected]>
 Sidhant Sharma <[email protected]> Sidhant Sharma [:tk]
 Simon Hausmann <[email protected]> <[email protected]>
 Simon Hausmann <[email protected]> <[email protected]>
+Slavica Đukić <[email protected]> Slavica Djukic <[email protected]>
 Stefan Beller <[email protected]> <[email protected]>
 Stefan Beller <[email protected]> <[email protected]>
 Stefan Naewe <[email protected]> <[email protected]>
@@ -296,3 +311,7 @@ Yi-Jyun Pan <[email protected]>
 anonymous <[email protected]>
 anonymous <[email protected]>
 İsmail Dönmez <[email protected]>
+
+# Do not merge
+# Andreas Schwab <[email protected]>
+# Andreas Schwab <[email protected]>
Signature · 1 line
2.32.0
#1 lore raw
Quoted 5 lines · Fangyi Zhou

Similar to a35b13fce0 (Update .mailmap, 2018-11-09).

This patch makes the output of git shortlog -nse v2.10.0..master duplicate-free by taking/guessing the current and preferred addresses for authors that appear with more than one address.

The line for Jessica Clarke should probably just be

Jessica Clarke <[email protected]>

That works the same and doesn't put a reference to an old name.

#2 lore raw
Quoted 7 lines · Gwyneth Morgan
Quoted 5 lines · Fangyi Zhou

Similar to a35b13fce0 (Update .mailmap, 2018-11-09).

This patch makes the output of git shortlog -nse v2.10.0..master duplicate-free by taking/guessing the current and preferred addresses for authors that appear with more than one address.

Quoted 5 lines

The line for Jessica Clarke should probably just be

Jessica Clarke <[email protected]>

That works the same and doesn't put a reference to an old name.

Thanks, that's a good suggestion. I kind of wonder if these mass mailmap-cleanup patches are a good idea in general. They are making assumptions about how people want their names to be represented, and whether and how they want any mappings to appear. Maybe that's something we should be leaving to people to propose for their own identities.

Of course people who aren't active in the project anymore may not bother to do the cleanup, and of course messy data makes me sad. But on the whole, I'm not sure it's that big a deal either way.

-Peff

#4 lore raw
In reply to Jeff King
Quoted 14 lines · Jeff King
Quoted 5 lines · Gwyneth Morgan

The line for Jessica Clarke should probably just be

Jessica Clarke <[email protected]>

That works the same and doesn't put a reference to an old name.

Thanks, that's a good suggestion. I kind of wonder if these mass mailmap-cleanup patches are a good idea in general. They are making assumptions about how people want their names to be represented, and whether and how they want any mappings to appear. Maybe that's something we should be leaving to people to propose for their own identities.

Quoted 3 lines

Of course people who aren't active in the project anymore may not bother to do the cleanup, and of course messy data makes me sad. But on the whole, I'm not sure it's that big a deal either way.

I am not enthused by the idea of replying to this thread, knowing that many of the CC'ed addresses will bounce X-<, but I agree with you on all three counts. Even for those who are no longer active, it makes sense to unify multiple idents that are spelled differently to help "git shortlog", but which one to unify to is not something we can decide without their input.

Which leads me to suggest something like the attached patch. I wrote "Please notify us" for those who are no longer active and forgot how .mailmap entries are spelled to ask for help correcting.

Of course, the updated instruction does not prevent a motivated volunteer to contact the people _individually_ and then send in a patch with entries that the volunteer secured consent, perhaps in the form of Acked-by ;-)

 .mailmap | 5 +++++
 1 file changed, 5 insertions(+)
.mailmap +5 -0
index 9c6a446bdf..20b581c879 100644
@@ -4,6 +4,11 @@
 # and/or not always written the same way, making contributions from the
 # same person appearing not to be so.
 #
+# If you find an incorrect entry that affects yourself, please notify us
+# at <[email protected]> and suggest corrections.  Because the way people
+# want their names to be represented varies, please refrain from touching
+# entries for other people unless you positively know that the updated
+# entries are what they want.
 
 <[email protected]> <[email protected]>
 Alejandro R. Sedeño <[email protected]> <[email protected]>
#5 lore raw
Quoted 46 lines · Junio C Hamano
Quoted 14 lines · Jeff King
Quoted 5 lines · Gwyneth Morgan

The line for Jessica Clarke should probably just be

Jessica Clarke <[email protected]>

That works the same and doesn't put a reference to an old name.

Thanks, that's a good suggestion. I kind of wonder if these mass mailmap-cleanup patches are a good idea in general. They are making assumptions about how people want their names to be represented, and whether and how they want any mappings to appear. Maybe that's something we should be leaving to people to propose for their own identities.

Quoted 3 lines

Of course people who aren't active in the project anymore may not bother to do the cleanup, and of course messy data makes me sad. But on the whole, I'm not sure it's that big a deal either way.

I am not enthused by the idea of replying to this thread, knowing that many of the CC'ed addresses will bounce X-<, but I agree with you on all three counts. Even for those who are no longer active, it makes sense to unify multiple idents that are spelled differently to help "git shortlog", but which one to unify to is not something we can decide without their input.

Which leads me to suggest something like the attached patch. I wrote "Please notify us" for those who are no longer active and forgot how .mailmap entries are spelled to ask for help correcting.

Of course, the updated instruction does not prevent a motivated volunteer to contact the people _individually_ and then send in a patch with entries that the volunteer secured consent, perhaps in the form of Acked-by ;-)

 .mailmap | 5 +++++
 1 file changed, 5 insertions(+)
.mailmap +0 -0
index 9c6a446bdf..20b581c879 100644
@@ -4,6 +4,11 @@
 # and/or not always written the same way, making contributions from the

.mailmap line 14

Quoted 10 lines
.mailmap +5 -0
 # same person appearing not to be so.
 #
+# If you find an incorrect entry that affects yourself, please notify us
+# at <[email protected]> and suggest corrections.  Because the way people
+# want their names to be represented varies, please refrain from touching
+# entries for other people unless you positively know that the updated
+# entries are what they want.
 
 <[email protected]> <[email protected]>
 Alejandro R. Sedeño <[email protected]> <[email protected]>

That seems too high a burden for edits that are likely to be uncontroversial.

I.e. this seems targeted at someone who's changing someone's name without their approval after the fact and when they can't be contacted.

Whereas most if not all edits to this file are likely to be janitorial work such as de-duplicating E-Mail addresses, or cases where the people involved even if they can't be contacted have already shared this information unambiguously with the world, it just happens to be in the mailing list archive, not in .mailmap.

E.g. I'd think these were fine, even assuming you can't contact the parties involved:

* The ML history reveals someone who's clearly the same person was using N E-Mail addresses in succession, we should probably map it all to the latest one, unclutters shortlog and the like.

* Ditto even for their name in some cases. Is someone's commit history 200 commits of abbreviating their middle name, with 1-2 commits at the start where they don't? Seems fine to just normalize that.

* Is the E-Mail they last used bouncing their E-Mails ("this person doesn't work here anymore"), domain expired etc?

It would be useful to other contributors to map that to [email protected] or whatever so they won't waste time CC-ing a bad address.

Which doesn't mean that there aren't things we shouldn't be doing without asking:

* Changing a name from Alice to Bob? Yes, ask and have the person ack it.

* Found the current E-Mail address someone who contributed years ago but not under that address to git.git? Ask them first, they may not wish to be contacted at all.

etc.

#6 lore raw

[culling cc list as earlier]

Quoted 6 lines · Ævar Arnfjörð Bjarmason

Whereas most if not all edits to this file are likely to be janitorial work such as de-duplicating E-Mail addresses, or cases where the people involved even if they can't be contacted have already shared this information unambiguously with the world, it just happens to be in the mailing list archive, not in .mailmap.

Quoted 6 lines

E.g. I'd think these were fine, even assuming you can't contact the parties involved:

* The ML history reveals someone who's clearly the same person was using N E-Mail addresses in succession, we should probably map it all to the latest one, unclutters shortlog and the like.

Just playing devil's advocate for a moment. What about people who have used two different identities because they were contributing in two different capacities (say, one from a work email, where they want to continue to credit that entity, and then later from a personal email).

That works against the goal of "you can easily email the person from an old commit". But it seems reasonable to respect their wishes there (e.g., they may not _want_ to deal with old contributions submitted as part of work).

The root of the problem is that we don't know their wishes, so we are making an assumption when a third party proposes the change.

-Peff

#7 lore raw
In reply to Junio C Hamano
Quoted 3 lines · Junio C Hamano

Which leads me to suggest something like the attached patch. I wrote "Please notify us" for those who are no longer active and forgot how .mailmap entries are spelled to ask for help correcting.

FWIW, that seems like a quite reasonable addition to me.

-Peff

#8 lore raw

Oddidies in the .mailmap parser & future syntax extensions

In reply to Gwyneth Morgan

[Changed subject]

Quoted 7 lines · Gwyneth Morgan
Quoted 5 lines · Fangyi Zhou

Similar to a35b13fce0 (Update .mailmap, 2018-11-09).

This patch makes the output of git shortlog -nse v2.10.0..master duplicate-free by taking/guessing the current and preferred addresses for authors that appear with more than one address.

Quoted 5 lines

The line for Jessica Clarke should probably just be

Jessica Clarke <[email protected]>

That works the same and doesn't put a reference to an old name.

It does work exactly the same!

More specifically this is an unintentional bug/misfeature/looseness in the .mailmap parser, an entry like:

Foo <[email protected]> Bar

Is exactly equivalent to:

Foo <[email protected]>

I.e. we simply ignore the " Bar" part. The reason for this is that we're internally treating nonsense input as if the line simply ended there.

Even having documented and tested some of this recently in 05b5ff219c2 (mailmap doc + tests: add better examples & test them, 2021-01-12) I found this a bit surprising. I probably found out at the time, but forgot and had to go source spelunking again.

I'd expect:

Foo <[email protected]> Bar

To be an alias/shorthand for:

Foo <[email protected]> Bar <[email protected]>

Which is something that might be applicable / useful in some cases.

E.g. a name might change over time from "Foo", to "Bar", to "Zar", but just because we're at "Bar" and want to map "Foo" to "Bar", that might not mean that we'd like to map any future name at the same address (i.e. the future "Zar") to the same "Foo".

In practice I suspect that's more commonly what people do want to do, maybe we should warn about it, I did mean to hook some pedantic mode of the parser at some point up to git-fsck.

More annoying is that this:

New <[email protected]> <[email protected]>
<[email protected]> <[email protected]>

Doesn't mean the same as:

New <[email protected]> <[email protected]>
New <[email protected]> <[email protected]>

I.e. I'd expect the name to map to the empty string, *unless* we saw an earlier address, i.e. just as we do for the first bar -> foo line (we map it to a name of "New", we don't map it to an empty name).

So that's some #leftoverbits, perhaps someone somewhere relies on that, but it seems like an obvious shorthand to have. I can't imagine it being useful to map to empty names, and much of e.g. git.git's mailmap is repeated entries with the same name over and over again.

I suppose we could also extend it to new syntax such as:

New <[email protected]> <[email protected]> <[email protected]>

Doing that would be strictly backwards compatible, i.e. now we'll entirely ignore the 3rd E-Mail address. It does mean we also accidentally support things like:

New <[email protected]> <[email protected]> # A comment, because we ignore everything after the 2nd address

But don't tell anyone I told you that :) But that is something that might technically have inadvertently closed the door to future syntax extensions, but we could probably do them anyway, or at worst have some heuristic.

Another useful thing might be to support:

    New <> Old <>

As an explicit mapping of the name "Old" wherever we see it to "New", or:

    New <> Old <>

To change just the name "Old" to "New" everywhere, without considering the E-Mail address. Both of those are probably too crazy to be useful, especially since if we supported that we'd logically also support:

    New <> <>

To assign all the commits to the name "New", but retain the address.

#9 lore raw

Re: Oddidies in the .mailmap parser & future syntax extensions

Quoted 1 line · Ævar Arnfjörð Bjarmason

[Changed subject]

[jc: culled CC addresses]

Quoted 7 lines

I'd expect:

Foo <[email protected]> Bar

To be an alias/shorthand for:

Foo <[email protected]> Bar <[email protected]>

OK.

Quoted 10 lines

More annoying is that this:

New <[email protected]> <[email protected]>
<[email protected]> <[email protected]>

Doesn't mean the same as:
...
I.e. I'd expect the name to map to the empty string, *unless* we saw an earlier address, i.e. just as we do for the first bar -> foo line (we map it to a name of "New", we don't map it to an empty name).

You expect the first one to map (anyname, <[email protected]>) to ("New", <[email protected]>) and you describe the second one does not map the human-readable part to "New", but it is unclear what the code does, or why you expect it to map to "" (or what your expectation is, for that matter, exactly---do you want an empty string, or do you want "New", or something else???).

FWIW, if we were designing it from scratch, I'd expect the second one to map (anyname, <[email protected]>) to ($1, <[email protected]>), keeping the human-readable part as-is and only map the e-mail part.

Or do you expect that when these two entries appear together, the first entry with "New" is carried over to the second entry?

Quoted 10 lines

Doing that would be strictly backwards compatible, i.e. now we'll entirely ignore the 3rd E-Mail address. It does mean we also accidentally support things like:

New <[email protected]> <[email protected]> # A comment, because we ignore everything after the 2nd address

But don't tell anyone I told you that :) But that is something that might technically have inadvertently closed the door to future syntax extensions, but we could probably do them anyway, or at worst have some heuristic.

I vaguely recall that it was not an accident but a deliberate feature to allow comments, but don't tell anyone I told you that.

#10 lore raw

Re: Oddidies in the .mailmap parser & future syntax extensions

Quoted 34 lines · Junio C Hamano
Quoted 1 line · Ævar Arnfjörð Bjarmason

[Changed subject]

[jc: culled CC addresses]

Quoted 7 lines

I'd expect:

Foo <[email protected]> Bar

To be an alias/shorthand for:

Foo <[email protected]> Bar <[email protected]>

OK.

Quoted 10 lines

More annoying is that this:

New <[email protected]> <[email protected]>
<[email protected]> <[email protected]>

Doesn't mean the same as:
...
I.e. I'd expect the name to map to the empty string, *unless* we saw an earlier address, i.e. just as we do for the first bar -> foo line (we map it to a name of "New", we don't map it to an empty name).

You expect the first one to map (anyname, <[email protected]>) to ("New", <[email protected]>) and you describe the second one does not map the human-readable part to "New", but it is unclear what the code does, or why you expect it to map to "" (or what your expectation is, for that matter, exactly---do you want an empty string, or do you want "New", or something else???).

Quoted 3 lines

FWIW, if we were designing it from scratch, I'd expect the second one to map (anyname, <[email protected]>) to ($1, <[email protected]>), keeping the human-readable part as-is and only map the e-mail part.

Yes, that's what it does now. I.e. we'll create two mappings from those lines, namely (in line-by-line regex-like pseudosyntax):

    [[(.*), [email protected]>] => [New, [email protected]]]
    [[(.*), [email protected]>] => [$1, [email protected]]]

I.e. for the second one we'll retain whatever name we found there.

Quoted 2 lines

Or do you expect that when these two entries appear together, the first entry with "New" is carried over to the second entry?

Yes, I'd expect it to be stateful and implicitly do:

    [[(.*), [email protected]>] => [New, [email protected]]]
    [[(.*), [email protected]>] => [find_last_name_for_address_in_mailmap(find_last_explicit_) || $1, [email protected]]]

I.e. we'd map the entries for you in git.git like:

diff --git a/.mailmap b/.mailmap
index 9c6a446bdfb..2a884981e9d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -127,8 +127,8 @@ Julian Phillips <[email protected]> <[email protected]>
Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]> +<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>

Which are currently mostly redundant, except for one old commit under [email protected] where the " C " wasn't present in your name field.

One might say that's a feature, and you'd like to be explicit about when to map addresses and when to map names, i.e. if we were trying to minimize the size of the .mailmap then this would be the most minimal thing we can get away with currently:

diff --git a/.mailmap b/.mailmap
index 9c6a446bdfb..4668f9b32f2 100644
--- a/.mailmap
+++ b/.mailmap
@@ -127,8 +127,8 @@ Julian Phillips <[email protected]> <[email protected]>
Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]> +<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>
Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]>
-Junio C Hamano <[email protected]> <[email protected]> +<[email protected]> <[email protected]>
+<[email protected]> <[email protected]>

But I just can't imagine cases where the proposed shorthand isn't useful for everyone.

Who wants to use mailmap, *and* map one e-mail address to another, *and* has an entry explicitly mapping the name, but *would* mind having git be auto-smart and follow the chain of that explicit name mapping if there's an entry after that with an an e-mail -> that-earlier-email mapping?

I think the answer is "nobody" and it would be unambiguously helpful, but maybe I'm wrong.

Quoted 6 lines
Quoted 6 lines

Doing that would be strictly backwards compatible, i.e. now we'll entirely ignore the 3rd E-Mail address. It does mean we also accidentally support things like:

New <[email protected]> <[email protected]> # A comment, because we ignore everything after the 2nd address

Quoted 7 lines
Quoted 4 lines

But don't tell anyone I told you that :) But that is something that might technically have inadvertently closed the door to future syntax extensions, but we could probably do them anyway, or at worst have some heuristic.

I vaguely recall that it was not an accident but a deliberate feature to allow comments, but don't tell anyone I told you that.

Which works, right until someone has an old name entry that looks like a comment :)

#11 lore raw

Re: Oddidies in the .mailmap parser & future syntax extensions

Quoted 4 lines · Ævar Arnfjörð Bjarmason

Who wants to use mailmap, *and* map one e-mail address to another, *and* has an entry explicitly mapping the name, but *would* mind having git be auto-smart and follow the chain of that explicit name mapping if there's an entry after that with an an e-mail -> that-earlier-email mapping?

Would it make a difference if I point out that at least for our project, we want to keep the .mailmap lines be sorted? I suspect that a "list must be mechanically sorted" requirement may make it awkward to also have an "if name is missing, use the last matching explicit name". Also, it makes removing one entry among many for the same person less straight-forward (if you are removing the one that happens to be listed first, you need to move the name to the next entry in order to avoid losing it).

#12 lore raw

Re: Oddidies in the .mailmap parser & future syntax extensions

Quoted 9 lines · Junio C Hamano
Quoted 4 lines · Ævar Arnfjörð Bjarmason

Who wants to use mailmap, *and* map one e-mail address to another, *and* has an entry explicitly mapping the name, but *would* mind having git be auto-smart and follow the chain of that explicit name mapping if there's an entry after that with an an e-mail -> that-earlier-email mapping?

Would it make a difference if I point out that at least for our project, we want to keep the .mailmap lines be sorted?

I just used git.git as a handy example. If the project wants to not use some new shorthand syntax to make for easy sorting it can just not use it. I don't think that should be an argument against the existence of such a syntax for those who'd like it.

Quoted 6 lines

I suspect that a "list must be mechanically sorted" requirement may make it awkward to also have an "if name is missing, use the last matching explicit name". Also, it makes removing one entry among many for the same person less straight-forward (if you are removing the one that happens to be listed first, you need to move the name to the next entry in order to avoid losing it).

That's a good point, that E-Mail was written rather off-hand, and I see from find_last_name_for_address_in_mailmap() that I probably had that ordering in mind.

But given that point I think a shorthand like that would be equally or more useful if we don't care about the order, the "more" being because you'd be able to sort it in any way you like and still get the same results.

I.e. when mapping:

<[email protected]> <[email protected]>
<[email protected]> <[email protected]>

We'll have fully parsed the file, and having also seen:

Junio C Hamano <[email protected]> <[email protected]>

We can follow the chain and see that since <[email protected]> has explicit wanted name mapping, that we should use that for say <[email protected]>, because it wants to map to <[email protected]>, so it should also get the name mapping.

Except if we had more than one name mapping, but that could/should also be detected regardless of order.