git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Robin Jarry <robin@jarry.cc>,
	git@vger.kernel.org, Tim Culverhouse <tim@timculverhouse.com>,
	Nicolas Dichtel <nicolas.dichtel@6wind.com>,
	Bagas Sanjaya <bagasdotme@gmail.com>,
	Eric Sunshine <sunshine@sunshineco.com>
Subject: Re: [PATCH RESEND] hooks: add sendemail-validate-series
Date: Mon, 03 Apr 2023 08:42:16 -0700	[thread overview]
Message-ID: <xmqqo7o59dlz.fsf@gitster.g> (raw)
In-Reply-To: <66099367-4ea0-7d2a-a089-7a88e27f695e@dunelm.org.uk> (Phillip Wood's message of "Mon, 3 Apr 2023 15:09:32 +0100")

Phillip Wood <phillip.wood123@gmail.com> writes:

>>   diff --git a/git-send-email.perl b/git-send-email.perl
>> index 07f2a0cbeaad..bec4d0f4ab47 100755
>> --- a/git-send-email.perl
>> +++ b/git-send-email.perl
>> @@ -800,6 +800,7 @@ sub is_format_patch_arg {
>>   			validate_patch($f, $target_xfer_encoding);
>>   		}
>>   	}
>> +	validate_patch_series(@files)
>
> This happens fairly early, before the user has had a chance to edit
> the patches and before we have added all the recipient and in-reply-to
> headers to the patch files. Would it be more useful to validate what
> will actually be sent?

I actually think the original intent was to catch errors in the part
of the file that can mechanically be created before letting the user
spend time on editing, without realizing that a later stage will be
rejected due to the auto-generated (e.g. came from a commit object)
stuff.  I do not know why we need another hook to do pretty much the
same thing as the existing one (which could be taught to spool and
then the last round to validate, in addition to each step rejecting
incoming one as needed), but at least calling it there would be very
much in line with the existing one, I would say.

Thanks for a careful review.

  parent reply	other threads:[~2023-04-03 15:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-02 18:56 [PATCH RESEND] hooks: add sendemail-validate-series Robin Jarry
2023-04-03  0:17 ` Eric Sunshine
2023-04-03 14:09 ` Phillip Wood
2023-04-03 14:32   ` Robin Jarry
2023-04-03 15:20     ` Phillip Wood
2023-04-03 15:42   ` Junio C Hamano [this message]
2023-04-03 17:25     ` Robin Jarry
2023-04-03 22:29   ` Robin Jarry
2023-04-03 22:52     ` Junio C Hamano
2023-04-03 22:59       ` Robin Jarry
2023-04-04 20:14         ` Junio C Hamano
2023-04-05  8:31           ` Robin Jarry
2023-04-05 21:49             ` Junio C Hamano
2023-04-05 23:13 ` [PATCH v2] " Robin Jarry
2023-04-06  8:56   ` Ævar Arnfjörð Bjarmason
2023-04-11  9:58     ` Phillip Wood
2023-04-11 10:39       ` Robin Jarry
2023-04-11 15:58       ` Junio C Hamano

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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqo7o59dlz.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=bagasdotme@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=nicolas.dichtel@6wind.com \
    --cc=phillip.wood123@gmail.com \
    --cc=robin@jarry.cc \
    --cc=sunshine@sunshineco.com \
    --cc=tim@timculverhouse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* 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

	https://80x24.org/mirrors/git.git

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).