Re: [PATCH] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names
- From
Joe Perches <joe@perches.com>
- Date
- Nov 20, 2010, 21:01 UTC
- Message-ID
- <1290286877.31117.15.camel@Joe-Laptop>
- In-Reply-To
- <m2mxp3zr88.fsf@igel.home>
On Sat, 2010-11-20 at 21:15 +0100, Andreas Schwab wrote:
Show 12 quoted lines
> Joe Perches <joe@perches.com> writes:
> > diff --git a/git-send-email.perl b/git-send-email.perl
> > index f68ed5a..1ae5fbf 100755
> > --- a/git-send-email.perl
> > +++ b/git-send-email.perl
> > @@ -960,7 +960,7 @@ sub maildomain {
> > sub send_message {
> > my @recipients = unique_email_list(@to);
> > @cc = (grep { my $cc = extract_valid_address($_);
> > - not grep { $cc eq $_ } @recipients
> > + not grep { $cc eq $_ || $_ =~ /<${cc}>$/ } @recipients
> /<\Q${cc}\E>$/Why are \Q and \E useful here? extract_valid_address provides an unadorned email address. I've now tested with and without, both seem to work properly.