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

Re: [PATCH v5 2/2] send-email: expose header information to git-send-email's sendemail-validate hook

From
LTLuben Tuikov <luben.tuikov@amd.com>
Date
Jan 17, 2023, 04:56 UTC
Message-ID
<ba987147-6b13-e1f8-e6b6-4efddcce6a37@amd.com>
In-Reply-To
<xmqqmt6hbx6y.fsf@gitster.g>
On 2023-01-16 23:29, Junio C Hamano wrote:
Show 23 quoted lines
> Luben Tuikov <luben.tuikov@amd.com> writes:
> 
>> We're generally not interested in "what else" is in the SMTP envelope
>> and headers.
>> ...
>> The idea is that hook writers would merely be grepping for a particular
>> header they're interested in--it could even be a custom header, "X-something"
>> for instance, and if present, they'll check the contents of that header and
>> validate the patch, or perform some other action.
> 
> I am following you thus far, but ...
> 
>> So, checking that the SMTP envelope and headers, $2, is not empty suffices
>> for what this patch set implements. We leave it up to the hook writers to
>> inspect the SMTP envelope and headers for their particular hook purpose.
> 
> ... I am lost here.  To make sure that the hook writers' grepping
> for a particular contents in the file $2 does find what they are
> trying to find, wouldn't we want to have a test that looks for a
> "known" header that should exist in the expected output (or even
> better, arrange the send-email invocation so that a custom header is
> injected to the output of format-patch and grep for that "known"
> header)?

Yes, that's exactly how my Git is set up. (It's a bit more involved than this, but essentially a custom header is added and a check performed.)

I'll follow up on v6 2/2 patch review with this.
-- 
Regards,
Luben
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 13 of 16 in “send-email: expose header information to git-send-email's sendemail-validate hook”
  1. 0/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 10, 2023
  2. 1/2 send-email: refactor header generation functionsStrawbridge, Michael, Jan 10, 2023
  3. Ævar Arnfjörð BjarmasonJan 17, 2023
  4. Junio C HamanoJan 17, 2023
  5. 1/2 send-email: refactor header generation functionsStrawbridge, Michael, Jan 17, 2023
  6. 2/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 10, 2023
  7. Junio C HamanoJan 14, 2023
  8. Junio C HamanoJan 14, 2023
  9. Junio C HamanoJan 14, 2023
  10. Junio C HamanoJan 15, 2023
  11. Luben TuikovJan 17, 2023
  12. Junio C HamanoJan 17, 2023
  13. Luben TuikovJan 17, 2023
  14. Ævar Arnfjörð BjarmasonJan 17, 2023
  15. 2/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 17, 2023
  16. 0/2 send-email: expose header information to git-send-email's sendemail-validate hookStrawbridge, Michael, Jan 17, 2023

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.