From: Michael Strawbridge Date: Wed, 11 Oct 2023 20:25:31 GMT Subject: Re: [PATCH] send-email: move process_address_list earlier to avoid, uninitialized address error Message-ID: In-Reply-To: <7e2c92ff-b42c-4b3f-a509-9d0785448262@amd.com> Hi Bagas, If possible, please try the patch I just sent out and let me know if it works for your situation. Thanks, Michael On 10/11/23 16:22, Michael Strawbridge wrote: > Move processing of email address lists before the sendemail-validate > hook code.  This fixes email address validation errors when the optional > perl module Email::Valid is installed and multiple addresses are passed > in on a single to/cc argument like --to=foo@example.com,bar@example.com. > --- >  git-send-email.perl | 8 ++++---- >  1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/git-send-email.perl b/git-send-email.perl > index 288ea1ae80..cfd80c9d8b 100755 > --- a/git-send-email.perl > +++ b/git-send-email.perl > @@ -799,6 +799,10 @@ sub is_format_patch_arg { >   >  $time = time - scalar $#files; >   > +@initial_to = process_address_list(@initial_to); > +@initial_cc = process_address_list(@initial_cc); > +@initial_bcc = process_address_list(@initial_bcc); > + >  if ($validate) { >         # FIFOs can only be read once, exclude them from validation. >         my @real_files = (); > @@ -1099,10 +1103,6 @@ sub expand_one_alias { >         return $aliases{$alias} ? expand_aliases(@{$aliases{$alias}}) : $alias; >  } >   > -@initial_to = process_address_list(@initial_to); > -@initial_cc = process_address_list(@initial_cc); > -@initial_bcc = process_address_list(@initial_bcc); > - >  if ($thread && !defined $initial_in_reply_to && $prompting) { >         $initial_in_reply_to = ask( >                 __("Message-ID to be used as In-Reply-To for the first email (if any)? "),