diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-07-10 00:00:42 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-07-10 00:00:42 +0300 |
commit | b7ebe8f0479a75e4a8c6be4976330e461592c1f2 (patch) | |
tree | 9a215fbd6d4f7d2691654462de0c5138a8e99fca /t | |
parent | b2b7a5410d811579932a22ff61092780be1f0bb7 (diff) | |
parent | f9f60d70663a89ff06fd38c806e47fc51f29ff72 (diff) |
Merge branch 'ra/send-email-in-reply-to-from-command-line-wins' into master
"git send-email --in-reply-to=<msg>" did not use the In-Reply-To:
header with the value given from the command line, and let it be
overridden by the value on In-Reply-To: header in the messages
being sent out (if exists).
* ra/send-email-in-reply-to-from-command-line-wins:
send-email: restore --in-reply-to superseding behavior
Diffstat (limited to 't')
-rwxr-xr-x | t/t9001-send-email.sh | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 90f61c3400..ec261085ec 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -42,7 +42,8 @@ clean_fake_sendmail () { } test_expect_success $PREREQ 'Extract patches' ' - patches=$(git format-patch -s --cc="One <one@example.com>" --cc=two@example.com -n HEAD^1) + patches=$(git format-patch -s --cc="One <one@example.com>" --cc=two@example.com -n HEAD^1) && + threaded_patches=$(git format-patch -o threaded -s --in-reply-to="format" HEAD^1) ' # Test no confirm early to ensure remaining tests will not hang @@ -1219,6 +1220,17 @@ test_expect_success $PREREQ 'threading but no chain-reply-to' ' grep "In-Reply-To: " stdout ' +test_expect_success $PREREQ 'override in-reply-to if no threading' ' + git send-email \ + --dry-run \ + --from="Example <nobody@example.com>" \ + --to=nobody@example.com \ + --no-thread \ + --in-reply-to="override" \ + $threaded_patches >stdout && + grep "In-Reply-To: <override>" stdout +' + test_expect_success $PREREQ 'sendemail.to works' ' git config --replace-all sendemail.to "Somebody <somebody@ex.com>" && git send-email \ |