author | Junio C Hamano <gitster@pobox.com> | |
Fri, 12 Jun 2009 16:23:43 +0000 (09:23 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 12 Jun 2009 16:23:43 +0000 (09:23 -0700) |
* 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
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
1 | 2 | |||
---|---|---|---|---|
Documentation/git-send-email.txt | patch | | diff1 | | diff2 | | blob | history |
git-send-email.perl | patch | | diff1 | | diff2 | | blob | history |
t/t9001-send-email.sh | patch | | diff1 | | diff2 | | blob | history |
diff --cc Documentation/git-send-email.txt
Simple merge
diff --cc git-send-email.perl
index 4a77d445cd5e7c8ffe894da429b7e63ed7aabe8f,5d5169707b452836f3835069e4b015c45d3618af..303e03a8ce4031a1d9d6d00cb67abda1c30a63f3
--- 1/git-send-email.perl
--- 2/git-send-email.perl
+++ b/git-send-email.perl
@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 8ab1a78bf59e063ca57bcee0bbf26edba0bec9ce,8518acaca6ea01723bd2a2e36c90cae23f6fbdcb..9ce04fd47277e1641979eb583a95de41e2f75570
+++ b/t/t9001-send-email.sh
grep "In-Reply-To: <in-reply-id@example.com>"
'
+ test_expect_success 'no in-reply-to and no threading' '
+ git send-email \
+ --dry-run \
+ --from="Example <nobody@example.com>" \
+ --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 <nobody@example.com>" \
+ --to=nobody@example.com \
+ --thread \
+ --nochain-reply-to \
+ $patches $patches >stdout &&
+ grep "In-Reply-To: " stdout
+'
+
test_done