From: Junio C Hamano Date: Fri, 12 Jun 2009 16:23:43 +0000 (-0700) Subject: Merge branch 'mh/maint-fix-send-email-threaded' into mh/fix-send-email-threaded X-Git-Tag: v1.6.4-rc0~59^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=95a877a34c3838a92a99794ebc3b082f6f525899;p=git.git Merge branch 'mh/maint-fix-send-email-threaded' into mh/fix-send-email-threaded * mh/maint-fix-send-email-threaded: doc/send-email: clarify the behavior of --in-reply-to with --no-thread send-email: fix non-threaded mails add a test for git-send-email for non-threaded mails Conflicts: git-send-email.perl t/t9001-send-email.sh --- 95a877a34c3838a92a99794ebc3b082f6f525899 diff --cc git-send-email.perl index 4a77d445c,5d5169707..303e03a8c --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -1147,10 -1134,10 +1147,10 @@@ foreach my $t (@files) @cc = (@initial_cc, @cc); - send_message(); + my $message_was_sent = send_message(); # set up for the next message - if ($message_was_sent && - if ($thread && ++ if ($thread && $message_was_sent && ($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) { $reply_to = $message_id; if (length $references > 0) { diff --cc t/t9001-send-email.sh index 8ab1a78bf,8518acaca..9ce04fd47 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@@ -621,15 -621,14 +621,25 @@@ test_expect_success 'in-reply-to but n grep "In-Reply-To: " ' + test_expect_success 'no in-reply-to and no threading' ' + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + --nothread \ + $patches $patches >stdout && + ! grep "In-Reply-To: " stdout + ' + +test_expect_success 'threading but no chain-reply-to' ' + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + --thread \ + --nochain-reply-to \ + $patches $patches >stdout && + grep "In-Reply-To: " stdout +' + test_done