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
Jacob Keller <jacob.e.keller@intel.com>
Date
Aug 21, 2024, 19:09 UTC
Message-ID
<3e4ba368-ab44-4940-856a-800e0ba7ff9f@intel.com>
In-Reply-To
<CAPig+cRhEJP6-ZX3X9SYrGM335-XTp8V=D9Yc7xkJQAh-g8xRw@mail.gmail.com>
On 8/21/2024 11:27 AM, Eric Sunshine wrote:
Show 19 quoted lines
> On Wed, Aug 21, 2024 at 1:50 PM Josh Steadmon <steadmon@google.com> wrote:
>> On 2024.08.19 17:07, Jacob Keller wrote:
>>> diff --git a/t/t4203-mailmap.sh b/t/t4203-mailmap.sh
>>> @@ -73,11 +73,40 @@ test_expect_success 'check-mailmap --stdin arguments: mapping' '
>>>  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.
> 
> I had the same thought upon reading this.
> 
Yea, I think I've been convinced. I'll remove these tests.
Show 25 quoted lines
>>>  test_expect_success 'check-mailmap bogus contact --stdin' '
>>> -     test_must_fail git check-mailmap --stdin bogus </dev/null
>>> +     cat >expect <<-EOF &&
>>> +     <bogus>
>>> +     EOF
>>> +     cat >stdin <<-EOF &&
>>> +     bogus
>>> +     EOF
>>> +     git check-mailmap --stdin <stdin >actual &&
>>> +     test_cmp expect actual
>>> +'
>>
>> Similarly, I might change this to use a real address instead of "bogus",
>> as we're no longer checking for invalid input.>
> Ditto for this change, but even more so because this is a fairly
> significant semantic change. In particular, the documented and
> intended behavior of the command when --stdin is specified is that it
> will consume email addresses from *both* the command-line and from
> standard input, and I think the point of the original test was to
> verify that it still correctly recognized a bogus email address
> specified as an argument even when --stdin is requested. Given that
> understanding (assuming it's correct), then the original test was
> already perhaps somewhat iffy anyhow, but after this change, it is
> even less meaningful.
> 

I tried to ensure we have test cases covering both --stdin and a combination. I'll double check this in a v3 and ensure test cases covering the behavior.

Thanks for the feedback!
Previous: Eric SunshineNext: Jacob Keller
Message 7 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.