Re: [PATCH] send-email: move process_address_list earlier to avoid, uninitialized address error
- From
Bagas Sanjaya <bagasdotme@gmail.com>
- Date
- Oct 20, 2023, 02:50 UTC
- Message-ID
- <ZTHq4GHpeGq7D7zZ@debian.me>
- In-Reply-To
- <7e2c92ff-b42c-4b3f-a509-9d0785448262@amd.com>
On Wed, Oct 11, 2023 at 04:22:18PM -0400, Michael Strawbridge wrote:
Show 34 quoted lines
> 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)? "),Thanks for the fixup! The patch itself is whitespace-damaged, though, so I have to manually apply it. Regardless,
Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>
-- An old man doll... just what I always wanted! - Clara