diff mbox series

[v2] mailmap: consistently normalize brian m. carlson's name

Message ID 20180924173902.GB138072@aiede.svl.corp.google.com (mailing list archive)
State New, archived
Headers show
Series [v2] mailmap: consistently normalize brian m. carlson's name | expand

Commit Message

Jonathan Nieder Sept. 24, 2018, 5:39 p.m. UTC
v2.18.0-rc0~70^2 (mailmap: update brian m. carlson's email address,
2018-05-08) changed the mailmap to map

  sandals@crustytoothpaste.ath.cx
   -> brian m. carlson <sandals@crustytoothpaste.net>

instead of

  sandals@crustytoothpaste.net
    -> brian m. carlson <sandals@crustytoothpaste.ath.cx>

That means the mapping

  Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
    -> brian m. carlson <sandals@crustytoothpaste.net>

is redundant, so we can remove it.  More importantly, it means that
the identity "Brian M. Carlson <sandals@crustytoothpaste.net>" used in
some commits is not normalized any more.  Add a mapping for it.

Noticed while updating Debian's Git packaging, which uses "git
shortlog --no-merges" to produce a list of changes in each version,
grouped by author's (normalized) name.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
Hi,

brian m. carlson wrote:

> I think this commit message makes sense.  I apparently still fail to
> understand how the .mailmap format works, so I can't tell you if the
> patch is correct.

Thanks for looking it over.  What would it take to make the patch make
sense, too? ;-)

Most mailmap entries are of the form

	Some Name <someemail@example.com>

which means "Wherever you see the email address someemail@example.com,
canonicalize the author's name to Some Name".  We can use that:

	brian m. carlson <sandals@crustytoothpaste.net>

When we see sandals@crustytoothpaste.ath.cx, we also want to
canonicalize the email address.  For that, we can do

	brian m. carlson <sandals@crustytoothpaste.net> <sandals@crustytoothpaste.ath.cx>

There's only one person who has used these email addresses, so we
don't have to do matching by name.  If we wanted to tighten the name
normalization to match by name, I think we'd do something like

	brian m. carlson <sandals@crustytoothpaste.net> Brian M. Carlson

but I can't get that to seem to have any effect when I test with the
"git check-mailmap" command --- for example, "git check-mailmap 'Dana
How <random.email@example.com>'" does not map and "git check-mailmap
'Random Name <danahow@gmail.com>'" maps to 'Dana L. How
<danahow@gmail.com>'.

The even tighter matching used in v1

	brian m. carlson <sandals@crustytoothpaste.net> Brian M. Carlson <sandals@crustytoothpaste.net>

does work, but it's unnecessary complexity.  We don't need it.

How about this?

Changes since v1:
- loosened the matching to only look at email and ignore name
- no other changes

 .mailmap | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

brian m. carlson Sept. 25, 2018, 1:15 a.m. UTC | #1
On Mon, Sep 24, 2018 at 10:39:02AM -0700, Jonathan Nieder wrote:
> Hi,
> 
> brian m. carlson wrote:
> 
> > I think this commit message makes sense.  I apparently still fail to
> > understand how the .mailmap format works, so I can't tell you if the
> > patch is correct.
> 
> Thanks for looking it over.  What would it take to make the patch make
> sense, too? ;-)

I certainly didn't mean to imply a failing on your part for explaining
the change adequately.  I've just always found the format confusing and
I know others do, too.

> Most mailmap entries are of the form
> 
> 	Some Name <someemail@example.com>
> 
> which means "Wherever you see the email address someemail@example.com,
> canonicalize the author's name to Some Name".  We can use that:
> 
> 	brian m. carlson <sandals@crustytoothpaste.net>
> 
> When we see sandals@crustytoothpaste.ath.cx, we also want to
> canonicalize the email address.  For that, we can do
> 
> 	brian m. carlson <sandals@crustytoothpaste.net> <sandals@crustytoothpaste.ath.cx>
> 
> There's only one person who has used these email addresses, so we
> don't have to do matching by name.  If we wanted to tighten the name
> normalization to match by name, I think we'd do something like
> 
> 	brian m. carlson <sandals@crustytoothpaste.net> Brian M. Carlson
> 
> but I can't get that to seem to have any effect when I test with the
> "git check-mailmap" command --- for example, "git check-mailmap 'Dana
> How <random.email@example.com>'" does not map and "git check-mailmap
> 'Random Name <danahow@gmail.com>'" maps to 'Dana L. How
> <danahow@gmail.com>'.
> 
> The even tighter matching used in v1
> 
> 	brian m. carlson <sandals@crustytoothpaste.net> Brian M. Carlson <sandals@crustytoothpaste.net>
> 
> does work, but it's unnecessary complexity.  We don't need it.

This has been a really helpful explanation.  Thanks.

Maybe I'll have some time over the next week or so to send a patch to
the documentation to make it more understandable to past me.

> How about this?
> 
> Changes since v1:
> - loosened the matching to only look at email and ignore name
> - no other changes
> 
>  .mailmap | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/.mailmap b/.mailmap
> index f165222a78..bef3352b0d 100644
> --- a/.mailmap
> +++ b/.mailmap
> @@ -25,7 +25,7 @@ Ben Walton <bdwalton@gmail.com> <bwalton@artsci.utoronto.ca>
>  Benoit Sigoure <tsunanet@gmail.com> <tsuna@lrde.epita.fr>
>  Bernt Hansen <bernt@norang.ca> <bernt@alumni.uwaterloo.ca>
>  Brandon Casey <drafnel@gmail.com> <casey@nrlssc.navy.mil>
> -brian m. carlson <sandals@crustytoothpaste.net> Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
> +brian m. carlson <sandals@crustytoothpaste.net>
>  brian m. carlson <sandals@crustytoothpaste.net> <sandals@crustytoothpaste.ath.cx>
>  Bryan Larsen <bryan@larsen.st> <bryan.larsen@gmail.com>
>  Bryan Larsen <bryan@larsen.st> <bryanlarsen@yahoo.com>

Having read your explanation, this looks good.  Thanks for fixing this.
Jonathan Nieder Sept. 25, 2018, 2:13 a.m. UTC | #2
brian m. carlson wrote:
> On Mon, Sep 24, 2018 at 10:39:02AM -0700, Jonathan Nieder wrote:
>> brian m. carlson wrote:

>>> I think this commit message makes sense.
[...]
>>                              What would it take to make the patch make
>> sense, too? ;-)
>
> I certainly didn't mean to imply a failing on your part for explaining
> the change adequately.  I've just always found the format confusing and
> I know others do, too.

No worries.  I took the opportunity because the patch isn't in "next"
yet so I was looking for a way to nudge it forward.  I think v2 is
simpler than v1.  Thanks for your help.

[...]
> This has been a really helpful explanation.  Thanks.
>
> Maybe I'll have some time over the next week or so to send a patch to
> the documentation to make it more understandable to past me.

Sounds good.  I think the (non-)handling of the 'name <email> name'
case is likely to be a bug.

>> How about this?
[...]
> Having read your explanation, this looks good.  Thanks for fixing this.

\o/ Thanks for looking it over.

Sincerely,
Jonathan
diff mbox series

Patch

diff --git a/.mailmap b/.mailmap
index f165222a78..bef3352b0d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -25,7 +25,7 @@  Ben Walton <bdwalton@gmail.com> <bwalton@artsci.utoronto.ca>
 Benoit Sigoure <tsunanet@gmail.com> <tsuna@lrde.epita.fr>
 Bernt Hansen <bernt@norang.ca> <bernt@alumni.uwaterloo.ca>
 Brandon Casey <drafnel@gmail.com> <casey@nrlssc.navy.mil>
-brian m. carlson <sandals@crustytoothpaste.net> Brian M. Carlson <sandals@crustytoothpaste.ath.cx>
+brian m. carlson <sandals@crustytoothpaste.net>
 brian m. carlson <sandals@crustytoothpaste.net> <sandals@crustytoothpaste.ath.cx>
 Bryan Larsen <bryan@larsen.st> <bryan.larsen@gmail.com>
 Bryan Larsen <bryan@larsen.st> <bryanlarsen@yahoo.com>