summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e93368d)
raw | patch | inline | side by side (parent: e93368d)
author | Joe Perches <joe@perches.com> | |
Sat, 20 Nov 2010 23:06:05 +0000 (15:06 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 24 Nov 2010 18:10:35 +0000 (10:10 -0800) |
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>
"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>
git-send-email.perl | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index e1f29a72a10ff68c972b439749535d251bfd311c..92bcbd085c7a826ec9a862f9fea7f016f5387548 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
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);