From: Joe Perches <joe@perches.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: git <git@vger.kernel.org>
Subject: Re: [PATCH] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names
Date: Sat, 20 Nov 2010 13:01:17 -0800 [thread overview]
Message-ID: <1290286877.31117.15.camel@Joe-Laptop> (raw)
In-Reply-To: <m2mxp3zr88.fsf@igel.home>
On Sat, 2010-11-20 at 21:15 +0100, Andreas Schwab wrote:
> 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.
next prev parent reply other threads:[~2010-11-20 21:01 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-20 17:06 [PATCH] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names Joe Perches
2010-11-20 20:15 ` Andreas Schwab
2010-11-20 21:01 ` Joe Perches [this message]
2010-11-20 22:47 ` Pete Harlan
2010-11-20 23:06 ` [PATCH V2] " Joe Perches
2010-11-26 18:34 ` Junio C Hamano
2010-11-26 21:34 ` Joe Perches
2010-11-27 0:25 ` Junio C Hamano
2010-11-27 0:39 ` Joe Perches
2011-02-05 23:40 ` [PATCH] git-send-email.perl: Add --suppress-to Joe Perches
2011-02-06 20:28 ` Junio C Hamano
2010-11-20 22:57 ` [PATCH] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names Andreas Schwab
2010-11-20 23:00 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1290286877.31117.15.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=git@vger.kernel.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox