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

Re: [PATCH RESEND] hooks: add sendemail-validate-series

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 3, 2023, 15:42 UTC
Message-ID
<xmqqo7o59dlz.fsf@gitster.g>
In-Reply-To
<66099367-4ea0-7d2a-a089-7a88e27f695e@dunelm.org.uk>
Phillip Wood <phillip.wood123@gmail.com> writes:
Show 14 quoted lines
>>   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.
Previous: Phillip WoodNext: Robin Jarry
Message 6 of 18 in “hooks: add sendemail-validate-series”
  1. hooks: add sendemail-validate-seriesRobin Jarry, Apr 2, 2023
  2. Eric SunshineApr 3, 2023
  3. Phillip WoodApr 3, 2023
  4. Robin JarryApr 3, 2023
  5. Phillip WoodApr 3, 2023
  6. Junio C HamanoApr 3, 2023
  7. Robin JarryApr 3, 2023
  8. Robin JarryApr 3, 2023
  9. Junio C HamanoApr 3, 2023
  10. Robin JarryApr 3, 2023
  11. Junio C HamanoApr 4, 2023
  12. Robin JarryApr 5, 2023
  13. Junio C HamanoApr 5, 2023
  14. hooks: add sendemail-validate-seriesRobin Jarry, Apr 5, 2023
  15. Ævar Arnfjörð BjarmasonApr 6, 2023
  16. Phillip WoodApr 11, 2023
  17. Robin JarryApr 11, 2023
  18. Junio C HamanoApr 11, 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.