Web lists-archives.com

Re: [PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing




On Wed, Oct 10 2018, Rasmus Villemoes wrote:

> +			if ($c !~ /.+@.+|<.+>/) {
> +				printf("(body) Ignoring %s from line '%s'\n",
> +					$what, $_) unless $quiet;
> +				next;
> +			}
>  			push @cc, $c;
>  			printf(__("(body) Adding cc: %s from line '%s'\n"),
>  				$c, $_) unless $quiet;

There's a extract_valid_address() function in git-send-email already,
shouldn't this be:

    if (!extract_valid_address($c)) {
    [...]

Or is there a good reason not to use that function in this case?