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

Re: [PATCH v2] git-send-email: Use sanitized address when reading mbox body

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 27, 2024, 15:09 UTC
Message-ID
<xmqq34oywhgx.fsf@gitster.g>
In-Reply-To
<f245c5e8-b986-49f1-91fe-7e24593e8e85@prolan.hu>
Csókás Bence <csokas.bence@prolan.hu> writes:
> Valid addresses are already tested by former tests. I don't
> immediately see any tests that would cover non-Cc, non-*-by and
> non-email-address tags, so I might add them; should they be a separate
> testcase or part of this one? Or maybe even a separate patch?

The tests you added has only malformed addresses on trailers, and adding a few trailers with valid addresses *and* string that does not look like an address at all, would be a minimal fix that makes the test complete.

It makes it clear that the point of the new test is about strings found on trailers (that are dealt differently from addresses taken from other places) are handled appropriately, checked how they are shown to the MTA (with the comparison !address! output from fake.sendmail script) and how their additions are logged in the verbose output (with the pattern match with "^(body) Adding cc: ..."). Checking that totally irrelevant ones (e.g. bugId) are not even used as addresses, strings meant as addresses but malformed are used after correction, and well-formed addresses are used as-is, would form a complete set of observable behaviour from this feature.

Thanks.
Previous: Csókás Bence
Message 4 of 4 in “git-send-email: Use sanitized address when reading mbox body”
  1. git-send-email: Use sanitized address when reading mbox bodycsókás, Jun 26, 2024
  2. Junio C HamanoJun 26, 2024
  3. Csókás BenceJun 27, 2024
  4. Junio C HamanoJun 27, 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.