From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Oddidies in the .mailmap parser & future syntax extensions
Date: Fri, 10 Sep 2021 11:11:45 -0700 [thread overview]
Message-ID: <xmqq1r5wti5a.fsf@gitster.g> (raw)
In-Reply-To: <877dfocps2.fsf@evledraar.gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Fri, 10 Sep 2021 18:48:26 +0200")
Ævar Arnfjörð Bjarmason <avarab@gmail.com> writes:
> [Changed subject]
[jc: culled CC addresses]
> I'd expect:
>
> Foo <foo@example.com> Bar
>
> To be an alias/shorthand for:
>
> Foo <foo@example.com> Bar <foo@example.com>
OK.
> More annoying is that this:
>
> New <foo@example.com> <bar@example.com>
> <foo@example.com> <zar@example.com>
>
> 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, <bar@example.com>) to
("New", <foo@example.com>) 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, <zar@example.com>) to ($1, <foo@example.com>),
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?
> 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 <foo@example.com> <bar@example.com> # 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.
next prev parent reply other threads:[~2021-09-10 18:12 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-10 13:02 [PATCH] .mailmap: Update mailmap Fangyi Zhou
2021-09-10 15:22 ` Gwyneth Morgan
2021-09-10 15:31 ` Jeff King
2021-09-10 15:35 ` Sibi Siddharthan
2021-09-11 0:32 ` Junio C Hamano
2021-09-11 1:31 ` Ævar Arnfjörð Bjarmason
2021-09-11 14:52 ` Jeff King
2021-09-11 14:47 ` Jeff King
2021-09-10 16:48 ` Oddidies in the .mailmap parser & future syntax extensions Ævar Arnfjörð Bjarmason
2021-09-10 18:11 ` Junio C Hamano [this message]
2021-09-10 19:50 ` Ævar Arnfjörð Bjarmason
2021-09-10 20:20 ` Junio C Hamano
2021-09-13 4:02 ` Ævar Arnfjörð Bjarmason
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqq1r5wti5a.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=avarab@gmail.com \
--cc=git@vger.kernel.org \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).