git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2 1/3] check-mailmap: accept "user@host" contacts

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 21, 2024, 18:26 UTC
Message-ID
<xmqqjzg9ybpd.fsf@gitster.g>
In-Reply-To
<mjlmmgwczact5ryprmorqztip2ynpcu5gpbulfabnoul2ubnr6@pfaxe7j4xo3h>
Josh Steadmon <steadmon@google.com> writes:
Show 12 quoted lines
>>  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 ...
Show 8 quoted lines
>> -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.
Previous: Josh SteadmonNext: Jacob Keller
Message 4 of 10 in “send-email: add --mailmap support”
  1. 0/3 send-email: add --mailmap supportJacob Keller, Aug 20, 2024
  2. 1/3 check-mailmap: accept "user@host" contactsJacob Keller, Aug 20, 2024
  3. Josh SteadmonAug 21, 2024
  4. Junio C HamanoAug 21, 2024
  5. Jacob KellerAug 21, 2024
  6. Eric SunshineAug 21, 2024
  7. Jacob KellerAug 21, 2024
  8. 2/3 check-mailmap: add options for additional mailmap sourcesJacob Keller, Aug 20, 2024
  9. 3/3 send-email: add mailmap support via sendemail.mailmap and --mailmapJacob Keller, Aug 20, 2024
  10. Josh SteadmonAug 21, 2024

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.