merge-recursive: Defer rename/rename(2to1) handling until process_entry
[gitweb.git] / git-send-email.perl
index f68ed5a5d3208eb0669d7dc1289f40c567e077c7..98ab33aae7e35c2d288bc34ddb2bbc71f8a16cdd 100755 (executable)
@@ -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 $_ || $_ =~ /<\Q${cc}\E>$/ } @recipients
                    }
               map { sanitize_address($_) }
               @cc);
@@ -1091,7 +1091,7 @@ sub send_message {
                            "VALUES: server=$smtp_server ",
                            "encryption=$smtp_encryption ",
                            "hello=$smtp_domain",
-                           defined $smtp_server_port ? "port=$smtp_server_port" : "";
+                           defined $smtp_server_port ? " port=$smtp_server_port" : "";
                }
 
                if (defined $smtp_authuser) {
@@ -1319,7 +1319,8 @@ sub send_message {
 
        # set up for the next message
        if ($thread && $message_was_sent &&
-               (chain_reply_to() || !defined $reply_to || length($reply_to) == 0)) {
+               (chain_reply_to() || !defined $reply_to || length($reply_to) == 0 ||
+               $message_num == 1)) {
                $reply_to = $message_id;
                if (length $references > 0) {
                        $references .= "\n $message_id";