From 3e0c4ffdbddf1b3f84e0b8aa70e3b2fff68a56c5 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sun, 1 Mar 2009 23:45:41 +0100 Subject: [PATCH 1/2] send-email: respect in-reply-to regardless of threading git-send-email supports the --in-reply-to option even with --no-thread. However, the code that adds the relevant mail headers was guarded by a test for --thread. Remove the test, so that the user's choice is respected. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- git-send-email.perl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-send-email.perl b/git-send-email.perl index 449d938ba9..734dc9f4f9 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -727,7 +727,7 @@ Date: $date Message-Id: $message_id X-Mailer: git-send-email $gitversion "; - if ($thread && $reply_to) { + if ($reply_to) { $header .= "In-Reply-To: $reply_to\n"; $header .= "References: $references\n"; From aaab4b9fb97c1f638d02be7b8c432a4d57f37c56 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Wed, 11 Mar 2009 23:40:13 +0100 Subject: [PATCH 2/2] send-email: test --no-thread --in-reply-to combination 3e0c4ff (send-email: respect in-reply-to regardless of threading, 2009-03-01) fixed the handling of the In-Reply-To header when both --no-thread and --in-reply-to are in effect. Add a test for it. Signed-off-by: Thomas Rast Signed-off-by: Junio C Hamano --- t/t9001-send-email.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index d098a01ba3..a404204b17 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -292,4 +292,15 @@ test_expect_success '--compose adds MIME for utf8 subject' ' grep "^Subject: =?utf-8?q?utf8-s=C3=BCbj=C3=ABct?=" msgtxt1 ' +test_expect_success 'in-reply-to but no threading' ' + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + --in-reply-to="" \ + --no-thread \ + $patches | + grep "In-Reply-To: " +' + test_done