threads / patch / 18651

patchmailmap: resurrect lower-casing of email addresses

Subject: [PATCH] mailmap: resurrect lower-casing of email addresses

## tl;dr

20 messages between Mar 31, 2009 and Apr 8, 2009. Diffs are folded; open one to read it.

replies: 19people: 6as markdown or json

Johannes Schindelin· Mar 31, 2009, 00:18 UTC · lore

Commit 0925ce4(Add map_user() and clear_mailmap() to mailmap) broke the lower-casing of email addresses. This mostly did not matter if your .mailmap has only lower-case email addresses; However, we did not require .mailmap to contain lowercase-only email addresses.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
---
 lezzee how that goes
 mailmap.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
Show changes to mailmap.c +9 −0
diff --git a/mailmap.c b/mailmap.c
index f12bb45..6be91b6 100644
--- a/mailmap.c
+++ b/mailmap.c
@@ -50,6 +50,15 @@ static void add_mapping(struct string_list *map,
 {
 	struct mailmap_entry *me;
 	int index;
+	char *p;
+
+	if (old_email)
+		for (p = old_email; *p; p++)
+			*p = tolower(*p);
+	if (new_email)
+		for (p = new_email; *p; p++)
+			*p = tolower(*p);
+
 	if (old_email == NULL) {
 		old_email = new_email;
 		new_email = NULL;
-- 
1.6.2.1.613.g25746
A Large Angry SCM· Apr 2, 2009, 22:22 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

{I may be late to this change since I'm trying to catch up on the ML.] Johannes Schindelin wrote:

> Commit 0925ce4(Add map_user() and clear_mailmap() to mailmap) broke the
> lower-casing of email addresses.  This mostly did not matter if your
> .mailmap has only lower-case email addresses;  However, we did not
> require .mailmap to contain lowercase-only email addresses.

What part of the email address is this going to lowercase? Only the domain name is case agnostic.

Show 27 quoted lines
> 
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> ---
>  lezzee how that goes
>  mailmap.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/mailmap.c b/mailmap.c
> index f12bb45..6be91b6 100644
> --- a/mailmap.c
> +++ b/mailmap.c
> @@ -50,6 +50,15 @@ static void add_mapping(struct string_list *map,
>  {
>  	struct mailmap_entry *me;
>  	int index;
> +	char *p;
> +
> +	if (old_email)
> +		for (p = old_email; *p; p++)
> +			*p = tolower(*p);
> +	if (new_email)
> +		for (p = new_email; *p; p++)
> +			*p = tolower(*p);
> +
>  	if (old_email == NULL) {
>  		old_email = new_email;
>  		new_email = NULL;
Johannes Schindelin· Apr 2, 2009, 22:39 UTC · re: A Large Angry SCM · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Hi,
On Thu, 2 Apr 2009, A Large Angry SCM wrote:
Show 9 quoted lines
> {I may be late to this change since I'm trying to catch up on the ML.]
> Johannes Schindelin wrote:
> > Commit 0925ce4(Add map_user() and clear_mailmap() to mailmap) broke the
> > lower-casing of email addresses.  This mostly did not matter if your
> > .mailmap has only lower-case email addresses;  However, we did not
> > require .mailmap to contain lowercase-only email addresses.
> 
> What part of the email address is this going to lowercase? Only the domain
> name is case agnostic.
If that were true, I would get 10% emails less.

Ciao, Dscho

Junio C Hamano· Apr 2, 2009, 22:42 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>> What part of the email address is this going to lowercase? Only the domain
>> name is case agnostic.

That is my understanding of RFC, too. Let's see where this mail goes to find out how much more lenient the real world is ;-).

A Large Angry SCM· Apr 2, 2009, 22:58 UTC · re: Junio C Hamano · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Junio C Hamano wrote:
Show 9 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> 
>>> What part of the email address is this going to lowercase? Only the domain
>>> name is case agnostic.
> 
> That is my understanding of RFC, too.  Let's see where this mail goes to
> find out how much more lenient the real world is ;-).
> 
> 

Many email providers/servers are lenient when it comes to case in the local part of an email address (after all, they control the interpretation) but not every provider/server is and the RFC is VERY clear on this issue.

Johannes Schindelin· Apr 2, 2009, 23:08 UTC · re: A Large Angry SCM · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Hi,
On Thu, 2 Apr 2009, A Large Angry SCM wrote:
Show 16 quoted lines
> Junio C Hamano wrote:
> > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > 
> > > > What part of the email address is this going to lowercase? Only the
> > > > domain
> > > > name is case agnostic.
> > 
> > That is my understanding of RFC, too.  Let's see where this mail goes to
> > find out how much more lenient the real world is ;-).
> > 
> > 
> 
> Many email providers/servers are lenient when it comes to case in the 
> local part of an email address (after all, they control the 
> interpretation) but not every provider/server is and the RFC is VERY 
> clear on this issue.

And in one of my projects it is _very_ clear that this strict interpretation of the RFC, which does not matter in reality, _actively_ _hurts_.

In the alternative, can I ask you to adjust my .mailmap in your free time?

Thankyouverymuch, Dscho

A Large Angry SCM· Apr 2, 2009, 23:17 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Johannes Schindelin wrote:
Show 22 quoted lines
> Hi,
> 
> On Thu, 2 Apr 2009, A Large Angry SCM wrote:
> 
>> Junio C Hamano wrote:
>>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>>>
>>>>> What part of the email address is this going to lowercase? Only the
>>>>> domain
>>>>> name is case agnostic.
>>> That is my understanding of RFC, too.  Let's see where this mail goes to
>>> find out how much more lenient the real world is ;-).
>>>
>>>
>> Many email providers/servers are lenient when it comes to case in the 
>> local part of an email address (after all, they control the 
>> interpretation) but not every provider/server is and the RFC is VERY 
>> clear on this issue.
> 
> And in one of my projects it is _very_ clear that this strict 
> interpretation of the RFC, which does not matter in reality, _actively_ 
> _hurts_.
Care to provide actual justification for that statement.
> In the alternative, can I ask you to adjust my .mailmap in your free time?
_Your_ .mailmap file is your issue.

So which standards do you choose to follow and which do you choose to ignore?

Johannes Schindelin· Apr 3, 2009, 02:52 UTC · re: A Large Angry SCM · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Hi,
On Thu, 2 Apr 2009, A Large Angry SCM wrote:
Show 23 quoted lines
> Johannes Schindelin wrote:
> 
> > On Thu, 2 Apr 2009, A Large Angry SCM wrote:
> > 
> > > Junio C Hamano wrote:
> > > > Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> > > >
> > > > > > What part of the email address is this going to lowercase? 
> > > > > > Only the domain name is case agnostic.
> > > >
> > > > That is my understanding of RFC, too.  Let's see where this mail 
> > > > goes to find out how much more lenient the real world is ;-).
> > > >
> > > Many email providers/servers are lenient when it comes to case in 
> > > the local part of an email address (after all, they control the 
> > > interpretation) but not every provider/server is and the RFC is VERY 
> > > clear on this issue.
> > 
> > And in one of my projects it is _very_ clear that this strict 
> > interpretation of the RFC, which does not matter in reality, 
> > _actively_ _hurts_.
> 
> Care to provide actual justification for that statement.

Well, I _did_! I have at least _one_ repository where the case insensitive email addresses worked, and got fscked over, by having Git change behavior behind my back!

Show 7 quoted lines
> > In the alternative, can I ask you to adjust my .mailmap in your free 
> > time?
> 
> _Your_ .mailmap file is your issue.
> 
> So which standards do you choose to follow and which do you choose to 
> ignore?

You chose a rather inappropriate moment to start one of those damned flamewars -- I am in the middle of some rather important day-job meeting, plus two projects in the deadline-is-looming GSoC frenzy.

In case it was not clear yet: if I have to chose between following a standard and reality that just took over, I will _always_ choose the latter.

If you take this mail to start a flamewar for real (i.e. not answer to my concerns, but point out that standard X says bla, and that everybody else should just obey, oh, and fix their ways as of 20 years), please do remove me from the Cc: list.

Ciao, Dscho

Jeff King· Apr 3, 2009, 12:45 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

On Fri, Apr 03, 2009 at 04:52:46AM +0200, Johannes Schindelin wrote:
> In case it was not clear yet: if I have to chose between following a 
> standard and reality that just took over, I will _always_ choose the 
> latter.

The problem with "reality" here is that it is not 100% case-insensitive (and I'm not sure we have anything resembling actual data), and worse, that the person using git and the person whose reality is case-sensitive are _different_ people. So you could be breaking email addresses and have no idea, because the case-sensitivity is implemented on some random contributor's mail server.

That being said, this is actually restoring behavior broken only about 6 weeks ago (and looks like it was broken in 1.6.2, but no other release). So I am inclined to say this patch should be applied regardless of standards and reality if only because it is making git's behavior consistent across versions. And it looks like Junio has already applied it.

Now what git _should_ do is another question. Mailmap has been lower-casing addresses since 5496523 (shortlog: handle email addresses case-insensitively, 2006-11-19), and I don't think we've had a single complaint or bug report. Which implies that either reality _is_ primarily case-sensitive, or that people are not actually feeding mailmap'd addresses to mail servers. So if there is an issue, it is certainly not pressing, and while I can see and support a concerned somebody making a patch to address it, I am not that somebody.

Such a patch would have to take into account the very real use case Dscho is handling, but also address some other real use case (like cutting and pasting from shortlog output into a MUA). I assume the lower-casing is primarily used for aggregating similar addresses; we can do better to _preserve_ case while matching insensitively (and if there are multiple cases, then we pick one arbitrarily -- presumably that address _is_ case insensitive if it was used both ways).

Doing my best to turn a flame war into an actual discussion of merit,
-Peff
A Large Angry SCM· Apr 4, 2009, 01:32 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Johannes Schindelin wrote:
Show 53 quoted lines
> Hi,
> 
> On Thu, 2 Apr 2009, A Large Angry SCM wrote:
> 
>> Johannes Schindelin wrote:
>>
>>> On Thu, 2 Apr 2009, A Large Angry SCM wrote:
>>>
>>>> Junio C Hamano wrote:
>>>>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>>>>>
>>>>>>> What part of the email address is this going to lowercase? 
>>>>>>> Only the domain name is case agnostic.
>>>>> That is my understanding of RFC, too.  Let's see where this mail 
>>>>> goes to find out how much more lenient the real world is ;-).
>>>>>
>>>> Many email providers/servers are lenient when it comes to case in 
>>>> the local part of an email address (after all, they control the 
>>>> interpretation) but not every provider/server is and the RFC is VERY 
>>>> clear on this issue.
>>> And in one of my projects it is _very_ clear that this strict 
>>> interpretation of the RFC, which does not matter in reality, 
>>> _actively_ _hurts_.
>> Care to provide actual justification for that statement.
> 
> Well, I _did_!  I have at least _one_ repository where the case 
> insensitive email addresses worked, and got fscked over, by having Git 
> change behavior behind my back!
> 
>>> In the alternative, can I ask you to adjust my .mailmap in your free 
>>> time?
>> _Your_ .mailmap file is your issue.
>>
>> So which standards do you choose to follow and which do you choose to 
>> ignore?
> 
> You chose a rather inappropriate moment to start one of those damned 
> flamewars -- I am in the middle of some rather important day-job meeting, 
> plus two projects in the deadline-is-looming GSoC frenzy.
> 
> In case it was not clear yet: if I have to chose between following a 
> standard and reality that just took over, I will _always_ choose the 
> latter.
> 
> If you take this mail to start a flamewar for real (i.e. not answer to my 
> concerns, but point out that standard X says bla, and that everybody else 
> should just obey, oh, and fix their ways as of 20 years), please do remove 
> me from the Cc: list.
> 
> Ciao,
> Dscho
> )
> 

Sorry, this is not a flame war (and as Peff already sent a response that superior to my own) so I'll let Junio decide.

However, to keep the peace (and as a thank you for all the hard work to date, I'll say that I'm scheduled to be be Germany and Munich the first 10 days in October and I'll buy the first $100 dollars in drinks at any meet that participate in (as a thank you to all the hard work for git that has been performed) that may happen that I participate in).

Johannes Schindelin· Apr 6, 2009, 09:16 UTC · re: A Large Angry SCM · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Hi,
On Fri, 3 Apr 2009, A Large Angry SCM wrote:
> Sorry, this is not a flame war (and as Peff already sent a response that 
> superior to my own) so I'll let Junio decide.
Thanks for keeping a cool head where I failed.  My sincere apologies.
Show 5 quoted lines
> However, to keep the peace (and as a thank you for all the hard work to 
> date, I'll say that I'm scheduled to be be Germany and Munich the first 
> 10 days in October and I'll buy the first $100 dollars in drinks at any 
> meet that participate in (as a thank you to all the hard work for git 
> that has been performed) that may happen that I participate in).
I'll take you up on that!

Ciao, Dscho

A Large Angry SCM· Apr 7, 2009, 02:08 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Johannes Schindelin wrote:
Show 16 quoted lines
> Hi,
> 
> On Fri, 3 Apr 2009, A Large Angry SCM wrote:
> 
>> Sorry, this is not a flame war (and as Peff already sent a response that 
>> superior to my own) so I'll let Junio decide.
> 
> Thanks for keeping a cool head where I failed.  My sincere apologies.
> 
>> However, to keep the peace (and as a thank you for all the hard work to 
>> date, I'll say that I'm scheduled to be be Germany and Munich the first 
>> 10 days in October and I'll buy the first $100 dollars in drinks at any 
>> meet that participate in (as a thank you to all the hard work for git 
>> that has been performed) that may happen that I participate in).
> 
> I'll take you up on that!
s/Germany and Munich/Berlin and Munich/
Johannes Schindelin· Apr 7, 2009, 11:16 UTC · re: A Large Angry SCM · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Hi,
On Mon, 6 Apr 2009, A Large Angry SCM wrote:
Show 19 quoted lines
> Johannes Schindelin wrote:
> 
> > On Fri, 3 Apr 2009, A Large Angry SCM wrote:
> > 
> > > Sorry, this is not a flame war (and as Peff already sent a response 
> > > that superior to my own) so I'll let Junio decide.
> > 
> > Thanks for keeping a cool head where I failed.  My sincere apologies.
> > 
> > > However, to keep the peace (and as a thank you for all the hard work 
> > > to date, I'll say that I'm scheduled to be be Germany and Munich the 
> > > first 10 days in October and I'll buy the first $100 dollars in 
> > > drinks at any meet that participate in (as a thank you to all the 
> > > hard work for git that has been performed) that may happen that I 
> > > participate in).
> > 
> > I'll take you up on that!
> 
> s/Germany and Munich/Berlin and Munich/
Cool!  Berlin is only 2 hours from my home, so let's meet there!

We could even use the opportunity for a little informal German GitTogether... "Alles wird Git!"?

Ciao, Dscho

Markus Heidelberg· Apr 7, 2009, 19:58 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Johannes Schindelin, 07.04.2009:
Show 10 quoted lines
> Hi,
> 
> On Mon, 6 Apr 2009, A Large Angry SCM wrote:
> 
> > s/Germany and Munich/Berlin and Munich/
> 
> Cool!  Berlin is only 2 hours from my home, so let's meet there!
> 
> We could even use the opportunity for a little informal German 
> GitTogether... "Alles wird Git!"?

Damn, why only is Berlin on the other end of Germany compared to where I live?

Nice slogan, BTW.
Markus
Johannes Schindelin· Apr 8, 2009, 09:36 UTC · re: Markus Heidelberg · lore

Alles wird Git, was Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Hi,
[following ALASCM's example, I am culling the Cc: list]
On Tue, 7 Apr 2009, Markus Heidelberg wrote:
Show 13 quoted lines
> Johannes Schindelin, 07.04.2009:
> 
> > On Mon, 6 Apr 2009, A Large Angry SCM wrote:
> > 
> > > s/Germany and Munich/Berlin and Munich/
> > 
> > Cool!  Berlin is only 2 hours from my home, so let's meet there!
> > 
> > We could even use the opportunity for a little informal German 
> > GitTogether... "Alles wird Git!"?
> 
> Damn, why only is Berlin on the other end of Germany compared to where I 
> live?
There are planes ;-)
> Nice slogan, BTW.
Thanks!

Ciao, Dscho

A Large Angry SCM· Apr 8, 2009, 00:50 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

[CC list trimmed since I don't Junio is that interested in what this thread has morphed into.]

Johannes Schindelin wrote:
Show 25 quoted lines
> Hi,
> 
> On Mon, 6 Apr 2009, A Large Angry SCM wrote:
> 
>> Johannes Schindelin wrote:
>>
>>> On Fri, 3 Apr 2009, A Large Angry SCM wrote:
>>>
>>>> Sorry, this is not a flame war (and as Peff already sent a response 
>>>> that superior to my own) so I'll let Junio decide.
>>> Thanks for keeping a cool head where I failed.  My sincere apologies.
>>>
>>>> However, to keep the peace (and as a thank you for all the hard work 
>>>> to date, I'll say that I'm scheduled to be be Germany and Munich the 
>>>> first 10 days in October and I'll buy the first $100 dollars in 
>>>> drinks at any meet that participate in (as a thank you to all the 
>>>> hard work for git that has been performed) that may happen that I 
>>>> participate in).
>>> I'll take you up on that!
>> s/Germany and Munich/Berlin and Munich/
> 
> Cool!  Berlin is only 2 hours from my home, so let's meet there!
> 
> We could even use the opportunity for a little informal German 
> GitTogether... "Alles wird Git!"?
Could you translate that for the Deutsch-challenged among us?

According to the /current/ itinerary, the evenings I have free in Berlin are Saturday Oct 3 and Monday Oct 5.

Johannes Schindelin· Apr 8, 2009, 02:21 UTC · re: A Large Angry SCM · lore

Alles wird Git, was Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Hi,
On Tue, 7 Apr 2009, A Large Angry SCM wrote:
Show 9 quoted lines
> [CC list trimmed since I don't Junio is that interested in what this thread
> has morphed into.]
> 
> Johannes Schindelin wrote:
>
> > We could even use the opportunity for a little informal German 
> > GitTogether... "Alles wird Git!"?
> 
> Could you translate that for the Deutsch-challenged among us?
No problem:
	Everything is going to be alright.
(with the "alright" part misspelt so it reads "git" ;-)
> According to the /current/ itinerary, the evenings I have free in Berlin 
> are Saturday Oct 3 and Monday Oct 5.
Sir, we have a date.

Ciao, Dscho

A Large Angry SCM· Apr 8, 2009, 11:20 UTC · re: Johannes Schindelin · lore

Re: Alles wird Git

Johannes Schindelin wrote:
Show 23 quoted lines
> Hi,
> 
> On Tue, 7 Apr 2009, A Large Angry SCM wrote:
> 
>> [CC list trimmed since I don't Junio is that interested in what this thread
>> has morphed into.]
>>
>> Johannes Schindelin wrote:
>>
>>> We could even use the opportunity for a little informal German 
>>> GitTogether... "Alles wird Git!"?
>> Could you translate that for the Deutsch-challenged among us?
> 
> No problem:
> 
> 	Everything is going to be alright.
> 
> (with the "alright" part misspelt so it reads "git" ;-)
> 
>> According to the /current/ itinerary, the evenings I have free in Berlin 
>> are Saturday Oct 3 and Monday Oct 5.
> 
> Sir, we have a date.
Which date?
A Large Angry SCM· Apr 4, 2009, 01:51 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Johannes Schindelin wrote:
Show 48 quoted lines
> Hi,
> 
> On Thu, 2 Apr 2009, A Large Angry SCM wrote:
> 
>> Johannes Schindelin wrote:
>>
>>> On Thu, 2 Apr 2009, A Large Angry SCM wrote:
>>>
>>>> Junio C Hamano wrote:
>>>>> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
>>>>>
>>>>>>> What part of the email address is this going to lowercase? 
>>>>>>> Only the domain name is case agnostic.
>>>>> That is my understanding of RFC, too.  Let's see where this mail 
>>>>> goes to find out how much more lenient the real world is ;-).
>>>>>
>>>> Many email providers/servers are lenient when it comes to case in 
>>>> the local part of an email address (after all, they control the 
>>>> interpretation) but not every provider/server is and the RFC is VERY 
>>>> clear on this issue.
>>> And in one of my projects it is _very_ clear that this strict 
>>> interpretation of the RFC, which does not matter in reality, 
>>> _actively_ _hurts_.
>> Care to provide actual justification for that statement.
> 
> Well, I _did_!  I have at least _one_ repository where the case 
> insensitive email addresses worked, and got fscked over, by having Git 
> change behavior behind my back!
> 
>>> In the alternative, can I ask you to adjust my .mailmap in your free 
>>> time?
>> _Your_ .mailmap file is your issue.
>>
>> So which standards do you choose to follow and which do you choose to 
>> ignore?
> 
> You chose a rather inappropriate moment to start one of those damned 
> flamewars -- I am in the middle of some rather important day-job meeting, 
> plus two projects in the deadline-is-looming GSoC frenzy.
> 
> In case it was not clear yet: if I have to chose between following a 
> standard and reality that just took over, I will _always_ choose the 
> latter.
> 
> If you take this mail to start a flamewar for real (i.e. not answer to my 
> concerns, but point out that standard X says bla, and that everybody else 
> should just obey, oh, and fix their ways as of 20 years), please do remove 
> me from the Cc: list.

This is not worth a flame-war, and Peff has already created a response superior to my own, so I'll leave to Junio to find the best(TM) path.

Marius Storm-Olsen· Apr 7, 2009, 05:52 UTC · re: Johannes Schindelin · lore

Re: [PATCH] mailmap: resurrect lower-casing of email addresses

Johannes Schindelin said the following on 31.03.2009 02:18:
Show 6 quoted lines
> Commit 0925ce4(Add map_user() and clear_mailmap() to mailmap) broke the
> lower-casing of email addresses.  This mostly did not matter if your
> .mailmap has only lower-case email addresses;  However, we did not
> require .mailmap to contain lowercase-only email addresses.
> 
> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>

Ouch! Sorry for missing that part! IMO, it would be correct to simply restore previous behavior to lowercase the whole email, so:

Ack-by: Marius Storm-Olsen <marius@trolltech.com>
-- 
.marius [@trolltech.com]
'if you know what you're doing, it's not research'

← back to recent threads