From 528fb08732aa742edf56bc61cc8943c7f6d02977 Mon Sep 17 00:00:00 2001 From: Nanako Shiraishi Date: Sun, 29 Nov 2009 12:24:48 +0900 Subject: prepare send-email for smoother change of --chain-reply-to default Give a warning message when send-email uses chain-reply-to to thread the messages because of the current default, not because the user explicitly asked to, either from the command line or from the configuration. This way, by the time 1.7.0 switches the default, everybody will be ready. Signed-off-by: Nanako Shiraishi Signed-off-by: Junio C Hamano --- t/t9001-send-email.sh | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 't') diff --git a/t/t9001-send-email.sh b/t/t9001-send-email.sh index 84a7f03d46..798291240a 100755 --- a/t/t9001-send-email.sh +++ b/t/t9001-send-email.sh @@ -769,4 +769,53 @@ test_expect_success 'threading but no chain-reply-to' ' grep "In-Reply-To: " stdout ' +test_expect_success 'warning with an implicit --chain-reply-to' ' + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + outdir/000?-*.patch 2>errors >out && + grep "no-chain-reply-to" errors +' + +test_expect_success 'no warning with an explicit --chain-reply-to' ' + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + --chain-reply-to \ + outdir/000?-*.patch 2>errors >out && + ! grep "no-chain-reply-to" errors +' + +test_expect_success 'no warning with an explicit --no-chain-reply-to' ' + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + --no-chain-reply-to \ + outdir/000?-*.patch 2>errors >out && + ! grep "no-chain-reply-to" errors +' + +test_expect_success 'no warning with sendemail.chainreplyto = false' ' + git config sendemail.chainreplyto false && + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + outdir/000?-*.patch 2>errors >out && + ! grep "no-chain-reply-to" errors +' + +test_expect_success 'no warning with sendemail.chainreplyto = true' ' + git config sendemail.chainreplyto true && + git send-email \ + --dry-run \ + --from="Example " \ + --to=nobody@example.com \ + outdir/000?-*.patch 2>errors >out && + ! grep "no-chain-reply-to" errors +' + test_done -- cgit v1.2.3