[PATCH] git-send-email.perl: Deduplicate "to:" and "cc:" entries with names
From: Joe Perches <joe@perches.com>
Date: 2016-06-15 22:50:04
Subsystem:
the rest · Maintainer:
Linus Torvalds
From: Joe Perches <joe@perches.com>
Date: 2016-06-15 22:50:04
Subsystem:
the rest · Maintainer:
Linus Torvalds
If an email address in the "to:" list is in the style "First Last [off-list ref]", 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);