Re: [PATCH v5 2/2] send-email: expose header information to git-send-email's sendemail-validate hook
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 17, 2023, 04:29 UTC
- Message-ID
- <xmqqmt6hbx6y.fsf@gitster.g>
- In-Reply-To
- <f31f1480-d611-f4b4-0e7b-589574943eef@amd.com>
Luben Tuikov <luben.tuikov@amd.com> writes:
Show 7 quoted lines
> 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)?
Thanks.