summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 32ae831)
raw | patch | inline | side by side (parent: 32ae831)
author | Markus Heidelberg <markus.heidelberg@web.de> | |
Fri, 12 Jun 2009 10:51:38 +0000 (12:51 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 12 Jun 2009 16:20:21 +0000 (09:20 -0700) |
After commit 3e0c4ff (send-email: respect in-reply-to regardless of
threading, 2009-03-01) the variable $thread was only used for prompting
for an "In-Reply-To", but not for controlling whether the "In-Reply-To"
and "References" fields should be written into the email.
Thus these fields were always used beginning with the second mail and it
was not possible to produce non-threaded mails anymore.
However, a later commit 15da108 ("send-email: 'References:' should only
reference what is sent", 2009-04-13) introduced a regression with the
side effect to make non-threaded mails possible again, but only when
--no-chain-reply-to was used.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
threading, 2009-03-01) the variable $thread was only used for prompting
for an "In-Reply-To", but not for controlling whether the "In-Reply-To"
and "References" fields should be written into the email.
Thus these fields were always used beginning with the second mail and it
was not possible to produce non-threaded mails anymore.
However, a later commit 15da108 ("send-email: 'References:' should only
reference what is sent", 2009-04-13) introduced a regression with the
side effect to make non-threaded mails possible again, but only when
--no-chain-reply-to was used.
Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-send-email.perl | patch | blob | history | |
t/t9001-send-email.sh | patch | blob | history |
diff --git a/git-send-email.perl b/git-send-email.perl
index cccbf4517aa46d4d217a1ce25105f7c413301d2d..5d5169707b452836f3835069e4b015c45d3618af 100755 (executable)
--- a/git-send-email.perl
+++ b/git-send-email.perl
send_message();
# set up for the next message
- if ($chain_reply_to || !defined $reply_to || length($reply_to) == 0) {
+ if ($thread &&
+ ($chain_reply_to || !defined $reply_to || length($reply_to) == 0)) {
$reply_to = $message_id;
if (length $references > 0) {
$references .= "\n $message_id";
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh
index 5bfa36eccfaac1bb47cd3b581ced8c8007687310..8518acaca6ea01723bd2a2e36c90cae23f6fbdcb 100755 (executable)
--- a/t/t9001-send-email.sh
+++ b/t/t9001-send-email.sh
grep "In-Reply-To: <in-reply-id@example.com>"
'
-test_expect_failure 'no in-reply-to and no threading' '
+test_expect_success 'no in-reply-to and no threading' '
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \