Merge branch 'jc/send-email-pre-process-fix'

When "git send-email" that uses the validate hook is fed a message
without and then with Message-ID, it failed to auto-assign a unique
Message-ID to the former and instead reused the Message-ID from the
latter, which has been corrected.  This was a fix for a recent
regression caught before the release, so no need to mention it in
the release notes.

* jc/send-email-pre-process-fix:
  t9001: mark the script as no longer leak checker clean
  send-email: clear the $message_id after validation
This commit is contained in:
Junio C Hamano
2023-05-19 09:27:06 -07:00
2 changed files with 18 additions and 2 deletions

View File

@ -1788,6 +1788,7 @@ sub pre_process_file {
$subject = $initial_subject;
$message = "";
$message_num++;
undef $message_id;
# Retrieve and unfold header fields.
my @header_lines = ();
while(<$fh>) {