From: Junio C Hamano <gitster@pobox.com>
To: Josh Steadmon <steadmon@google.com>
Cc: Jacob Keller <jacob.e.keller@intel.com>,
Eric Sunshine <sunshine@sunshineco.com>,
Jeff King <peff@peff.net>,
git@vger.kernel.org
Subject: Re: [PATCH v2 1/3] check-mailmap: accept "user@host" contacts
Date: Wed, 21 Aug 2024 11:26:06 -0700 [thread overview]
Message-ID: <xmqqjzg9ybpd.fsf@gitster.g> (raw)
In-Reply-To: <mjlmmgwczact5ryprmorqztip2ynpcu5gpbulfabnoul2ubnr6@pfaxe7j4xo3h> (Josh Steadmon's message of "Wed, 21 Aug 2024 10:50:14 -0700")
Josh Steadmon <steadmon@google.com> writes:
>> test_expect_success 'check-mailmap bogus contact' '
>> - test_must_fail git check-mailmap bogus
>> + cat >expect <<-EOF &&
>> + <bogus>
>> + EOF
>> + git check-mailmap bogus >actual &&
>> + test_cmp expect actual
>> '
>
> I think I'd just remove this test case altogether, IIUC it' doesn't
> provide any additional value vs. the "check-mailmap simple address: no
> mapping" test below.
Sorry, but I do not follow. The other one is <bogus@company.xx>
that looks more globally routable address than a local-only <bogus>
mailbox. Isn't it worth ensuring that we will keep treating them
the same way?
Having said that ...
>> -For each ``Name $$<user@host>$$'' or ``$$<user@host>$$'' from the command-line
>> -or standard input (when using `--stdin`), look up the person's canonical name
>> -and email address (see "Mapping Authors" below). If found, print them;
>> -otherwise print the input as-is.
>> +For each ``Name $$<user@host>$$'', ``$$<user@host>$$'', or ``$$user@host$$''
>> +from the command-line or standard input (when using `--stdin`), look up the
>> +person's canonical name and email address (see "Mapping Authors" below). If
>> +found, print them; otherwise print the input as-is.
... it seems that <user> without <@host> is a supported format.
Should we update the document, too?
If the @host-less name is meant to trigger a random unspecified
behaviour, whatever the code happens to do, that is perfectly fine,
but then we probably should not be etching it in the stone by
writing a test for it. So because of a reason that is completely
different from yours, I'd support removal of the "bogus" test, if
that is the case.
Thanks.
next prev parent reply other threads:[~2024-08-21 18:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-20 0:07 [PATCH v2 0/3] send-email: add --mailmap support Jacob Keller
2024-08-20 0:07 ` [PATCH v2 1/3] check-mailmap: accept "user@host" contacts Jacob Keller
2024-08-21 17:50 ` Josh Steadmon
2024-08-21 18:26 ` Junio C Hamano [this message]
2024-08-21 19:07 ` Jacob Keller
2024-08-21 18:27 ` Eric Sunshine
2024-08-21 19:09 ` Jacob Keller
2024-08-20 0:07 ` [PATCH 1 v2 2/3] check-mailmap: add options for additional mailmap sources Jacob Keller
2024-08-20 0:07 ` [PATCH v2 3/3] send-email: add mailmap support via sendemail.mailmap and --mailmap Jacob Keller
2024-08-21 18:23 ` [PATCH v2 0/3] send-email: add --mailmap support Josh Steadmon
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=xmqqjzg9ybpd.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=peff@peff.net \
--cc=steadmon@google.com \
--cc=sunshine@sunshineco.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;
as well as URLs for NNTP newsgroup(s).