Code

Merge branch 'ao/send-email-irt'
authorJunio C Hamano <gitster@pobox.com>
Wed, 24 Nov 2010 23:55:32 +0000 (15:55 -0800)
committerJunio C Hamano <gitster@pobox.com>
Wed, 24 Nov 2010 23:55:32 +0000 (15:55 -0800)
* ao/send-email-irt:
  git-send-email.perl: make initial In-Reply-To apply only to first email
  t9001: send-email interation with --in-reply-to and --chain-reply-to

1  2 
git-send-email.perl

diff --combined git-send-email.perl
index 6e2d79ac661e3f31926c07291eddd953e0446cef,fe6b8485cd0c0781908cf83e377be048cfc0544b..76565de2ee517f48001ffacca32e3c08320cfe38
@@@ -960,7 -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);
@@@ -1319,7 -1319,8 +1319,8 @@@ foreach my $t (@files) 
  
        # 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";