diff --git a/git-send-email.perl b/git-send-email.perl index adf7ecb5c3..09fe3d95c4 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -821,7 +821,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"; diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 4df4f965cb..d7634187aa 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -455,4 +455,15 @@ test_expect_success 'feed two files' ' test "z$(sed -n -e 2p subjects)" = "zSubject: [PATCH 2/2] add master" ' +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