mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Luben Tuikov <>
To: Junio C Hamano <>
Cc: "Strawbridge, Michael" <>,
	"" <>
Subject: Re: [PATCH v5 2/2] send-email: expose header information to git-send-email's sendemail-validate hook
Date: Mon, 16 Jan 2023 23:56:58 -0500	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <xmqqmt6hbx6y.fsf@gitster.g>

On 2023-01-16 23:29, Junio C Hamano wrote:
> Luben Tuikov <> 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.

  reply	other threads:[~2023-01-17  4:58 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-10 21:16 [PATCH v5 0/2] send-email: expose header information to git-send-email's sendemail-validate hook Strawbridge, Michael
2023-01-10 21:16 ` [PATCH v5 1/2] send-email: refactor header generation functions Strawbridge, Michael
2023-01-17 13:20   ` Ævar Arnfjörð Bjarmason
2023-01-17 15:13     ` Junio C Hamano
2023-01-17 21:36     ` Strawbridge, Michael
2023-01-10 21:16 ` [PATCH v5 2/2] send-email: expose header information to git-send-email's sendemail-validate hook Strawbridge, Michael
2023-01-14  1:17   ` Junio C Hamano
2023-01-14 16:03   ` Junio C Hamano
2023-01-14 16:06     ` Junio C Hamano
2023-01-15  3:34       ` Junio C Hamano
2023-01-17  4:09         ` Luben Tuikov
2023-01-17  4:29           ` Junio C Hamano
2023-01-17  4:56             ` Luben Tuikov [this message]
2023-01-17 13:23   ` Ævar Arnfjörð Bjarmason
2023-01-17 21:58     ` Strawbridge, Michael
2023-01-17  1:49 ` [PATCH v5 0/2] " Strawbridge, Michael
  -- strict thread matches above, loose matches on Subject: below --
2023-01-17  1:37 Strawbridge, Michael
2023-01-17  1:37 ` [PATCH v5 2/2] " Strawbridge, Michael

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).