From: Joe Perches <joe@perches.com>
To: git <git@vger.kernel.org>
Subject: [PATCH] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names
Date: Sat, 20 Nov 2010 09:06:49 -0800 [thread overview]
Message-ID: <1290272809.27951.30.camel@Joe-Laptop> (raw)
If an email address in the "to:" list is in the style
"First Last <email@domain.tld>", ie: not just a bare
address like "email@domain.tld", and the same named
entry style exists in the "cc:" list, the current
logic will not remove the entry from the "cc:" list.
Add logic to better deduplicate the "cc:" list by also
matching the email address with angle brackets.
Signed-off-by: Joe Perches <joe@perches.com>
---
git-send-email.perl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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
}
map { sanitize_address($_) }
@cc);
next reply other threads:[~2010-11-20 17:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-20 17:06 Joe Perches [this message]
2010-11-20 20:15 ` [PATCH] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names Andreas Schwab
2010-11-20 21:01 ` Joe Perches
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=1290272809.27951.30.camel@Joe-Laptop \
--to=joe@perches.com \
--cc=git@vger.kernel.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