aboutsummaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2010-11-20 15:06:05 -0800
committerJunio C Hamano <gitster@pobox.com>2010-11-24 10:10:35 -0800
commit83acaaec12fcf33e605f441216ecc91c81b90449 (patch)
tree255f051373f284fe7d2648d43b92ff9aee65da04 /git-send-email.perl
parente93368d26ebcf69698b8454afb85c9c84bd54363 (diff)
downloadgit-83acaaec12fcf33e605f441216ecc91c81b90449.tar.gz
git-83acaaec12fcf33e605f441216ecc91c81b90449.tar.xz
git-send-email.perl: Deduplicate "to:" and "cc:" entries with names
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index e1f29a72a..92bcbd085 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -940,7 +940,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 $_ || $_ =~ /<\Q${cc}\E>$/ } @recipients
}
map { sanitize_address($_) }
@cc);