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

Re: [PATCH] Change git-send-email's sendemail-validate hook to use header information

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Nov 9, 2022, 23:16 UTC
Message-ID
<Y2w023Vi3Wt4J7se@tapette.crustytoothpaste.net>
In-Reply-To
<20221109182254.71967-1-michael.strawbridge@amd.com>
On 2022-11-09 at 18:23:06, Strawbridge, Michael wrote:
> Since commit-msg and pre-commit git hooks already expose commit
> contents, switch sendemail-validate to use the header information
> of the email that git-send-email intends to send.

I have a couple of thoughts here, and maybe you can explain them a bit better in the commit message for v2. First, I'm not sure why this is valuable. What do we gain from this that we don't have now? Why is the current state inadequate?

Also, how does this handle encoded headers? I'd like to see some tests before and after here, especially some including non-ASCII user.name values so that we can test that we do the right thing here. If there's some beneficial improvement here that results in a behaviour change, then of course we'd want to test that as well.

Finally, since we move the validation code farther down instead of first thing, is there any place that this would result in a different behaviour? For example, --dry-run mode? Is there any way we could send data that isn't validated but should be?

-- 
brian m. carlson (he/him or they/them)
Toronto, Ontario, CA
Previous: Taylor Blau
Message 3 of 3 in “Change git-send-email's sendemail-validate hook to use header information”
  1. Change git-send-email's sendemail-validate hook to use header informationStrawbridge, Michael, Nov 9, 2022
  2. Taylor BlauNov 9, 2022
  3. brian m. carlsonNov 9, 2022

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.