Re: [PATCH 2/3] send-email: only consider lines containing @ or <> for automatic Cc'ing
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Oct 10, 2018, 12:57 UTC
- Message-ID
- <871s8yez74.fsf@evledraar.gmail.com>
- In-Reply-To
- <20181010111351.5045-3-rv@rasmusvillemoes.dk>
On Wed, Oct 10 2018, Rasmus Villemoes wrote:
Show 8 quoted lines
> + 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?