From: Junio C Hamano <gitster@pobox.com>
To: Jacob Keller <jacob.e.keller@intel.com>
Cc: git <git@vger.kernel.org>, Jacob Keller <jacob.keller@gmail.com>
Subject: Re: [PATCH RFC] mailmap: fix check-mailmap with full mailmap line
Date: Thu, 13 Feb 2025 15:45:30 -0800 [thread overview]
Message-ID: <xmqqwmdtmmsl.fsf@gitster.g> (raw)
In-Reply-To: <20250213-jk-fix-sendemail-mailinfo-v1-1-c0b06c215f21@gmail.com> (Jacob Keller's message of "Thu, 13 Feb 2025 14:47:22 -0800")
Jacob Keller <jacob.e.keller@intel.com> writes:
> I recently had reported to me a crash from a coworker using the recently
> added sendemail mailmap support:
>
> 3724814 Segmentation fault (core dumped) git check-mailmap "bugs@company.xx"
Thanks for relaying the report.
I can easily reproduce your segfault with our own mailmap, by
picking at random an entry with both name and e-mail listed as
the mapping source, e.g.
$ git check-mailmap ksaitoh560@gmail.com
> With a mailmap file containing:
>
> A <a@domain.com> B <b@domain.com>
>
> I get the following unexpected result:
>
> $ git check-mailmap b@domain.com
> <b@domain.com>
>
> Based on my interpretation of the mailmap documentation, I would have
> expected this to translate to "A <a@domain.com>".
After reading "git help mailmap" twice, my interpretation is
different (disclaimer: I haven't read the implementation of the
mailmap code lately, and the last time I read any part of it is
probably at least a few years ago if not before).
Unlike "please map anybody with this e-mail address to 'A <a>'"
entry, which is spelled "A <a> <b>", the "fully spelled" form limits
the damage to those that match both name and e-mail, in order to
avoid "D <b>" from getting modified, while rewriting "B <b>" to "A
<a>". So I would not expect a request with no name to be mapped at
all.
And the command emits the e-mail intact when it does not find any
match, "b@domain.com" being answered by "<b@domain.com>" is quite
expected from my point of view.
Thanks.
next prev parent reply other threads:[~2025-02-13 23:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-13 22:47 [PATCH RFC] mailmap: fix check-mailmap with full mailmap line Jacob Keller
2025-02-13 23:45 ` Junio C Hamano [this message]
2025-02-15 0:24 ` Jacob Keller
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=xmqqwmdtmmsl.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=jacob.keller@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox