All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Stefan Beller <stefanbeller@googlemail.com>
Cc: git@vger.kernel.org
Subject: Re: Bug in .mailmap handling?
Date: Fri, 12 Jul 2013 13:38:13 -0700	[thread overview]
Message-ID: <7v8v1bjyyy.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <7vfvvjjzee.fsf@alter.siamese.dyndns.org> (Junio C. Hamano's message of "Fri, 12 Jul 2013 13:28:57 -0700")

Junio C Hamano <gitster@pobox.com> writes:

> Stefan Beller <stefanbeller@googlemail.com> writes:
>
>> 	git shortlog -sne
>> 		 1  A <A@example.org>
>> 		 1  A <a@example.org>
>
> This is coming from mailmap.c::add_mapping() that downcases the
> e-mail address.
>
> changed_email@example.org is mapped to a@example.org because of this
> downcasing, while "A <A@example.org>" does not have any entry for it
> in the .mailmap file, so it is given back as-is.  Hence we see two
> distinct entries.

I think it is wrong for the parser to lose information by
downcasing.

It is perfectly fine to do the comparison case insensitively, to
allow <changed_Email@example.org> in the input is mangled using the
entry for <changed_email@example.org> in the .mailmap file; it is
not fine to downcase the parsed result, especially the side that is
used as the "rewritten result" (i.e. the tokens earlier on the line),
as that would mean mangling the output.

Let me see if I can quickly whip up a fix.

  parent reply	other threads:[~2013-07-12 20:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12 16:07 Bug in .mailmap handling? Stefan Beller
2013-07-12 17:35 ` Junio C Hamano
2013-07-12 17:47   ` Stefan Beller
2013-07-12 20:28 ` Junio C Hamano
2013-07-12 20:35   ` Stefan Beller
2013-07-12 20:38   ` Junio C Hamano [this message]
2013-07-12 20:50     ` Junio C Hamano
2013-07-12 21:13       ` [PATCH] Add a testcase for checking case insensitivity of mail map Stefan Beller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7v8v1bjyyy.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=stefanbeller@googlemail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.