Skip to content

Commit

Permalink
Merge branch 'fc/send-email-chainreplyto-warning'
Browse files Browse the repository at this point in the history
An overdue removal of "behaviour changed at 1.7.0; if you were
living in a cave, here is what you can adjust to it" message.

* fc/send-email-chainreplyto-warning:
  send-email: remove warning about unset chainreplyto
  • Loading branch information
Junio C Hamano committed Jun 5, 2013
2 parents 7221dd3 + b99d22f commit 54b9b58
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 66 deletions.
19 changes: 2 additions & 17 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,9 @@ sub do_edit {

my ($debug_net_smtp) = 0; # Net::SMTP, see send_message()

my $not_set_by_user = "true but not set by the user";

my %config_bool_settings = (
"thread" => [\$thread, 1],
"chainreplyto" => [\$chain_reply_to, $not_set_by_user],
"chainreplyto" => [\$chain_reply_to, 0],
"suppressfrom" => [\$suppress_from, undef],
"signedoffbycc" => [\$signed_off_by_cc, undef],
"signedoffcc" => [\$signed_off_by_cc, undef], # Deprecated
Expand Down Expand Up @@ -241,19 +239,6 @@ sub do_edit {
"aliasesfile" => \@alias_files,
);

# Help users prepare for 1.7.0
sub chain_reply_to {
if (defined $chain_reply_to &&
$chain_reply_to eq $not_set_by_user) {
print STDERR
"In git 1.7.0, the default has changed to --no-chain-reply-to\n" .
"Set sendemail.chainreplyto configuration variable to true if\n" .
"you want to keep --chain-reply-to as your default.\n";
$chain_reply_to = 0;
}
return $chain_reply_to;
}

# Handle Uncouth Termination
sub signal_handler {

Expand Down Expand Up @@ -1437,7 +1422,7 @@ sub send_message {

# set up for the next message
if ($thread && $message_was_sent &&
(chain_reply_to() || !defined $reply_to || length($reply_to) == 0 ||
($chain_reply_to || !defined $reply_to || length($reply_to) == 0 ||
$message_num == 1)) {
$reply_to = $message_id;
if (length $references > 0) {
Expand Down
49 changes: 0 additions & 49 deletions t/t9001-send-email.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1003,55 +1003,6 @@ test_expect_success $PREREQ 'threading but no chain-reply-to' '
grep "In-Reply-To: " stdout
'

test_expect_success $PREREQ 'warning with an implicit --chain-reply-to' '
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
outdir/000?-*.patch 2>errors >out &&
grep "no-chain-reply-to" errors
'

test_expect_success $PREREQ 'no warning with an explicit --chain-reply-to' '
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
--chain-reply-to \
outdir/000?-*.patch 2>errors >out &&
! grep "no-chain-reply-to" errors
'

test_expect_success $PREREQ 'no warning with an explicit --no-chain-reply-to' '
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
--nochain-reply-to \
outdir/000?-*.patch 2>errors >out &&
! grep "no-chain-reply-to" errors
'

test_expect_success $PREREQ 'no warning with sendemail.chainreplyto = false' '
git config sendemail.chainreplyto false &&
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
outdir/000?-*.patch 2>errors >out &&
! grep "no-chain-reply-to" errors
'

test_expect_success $PREREQ 'no warning with sendemail.chainreplyto = true' '
git config sendemail.chainreplyto true &&
git send-email \
--dry-run \
--from="Example <nobody@example.com>" \
--to=nobody@example.com \
outdir/000?-*.patch 2>errors >out &&
! grep "no-chain-reply-to" errors
'

test_expect_success $PREREQ 'sendemail.to works' '
git config --replace-all sendemail.to "Somebody <somebody@ex.com>" &&
git send-email \
Expand Down

0 comments on commit 54b9b58

Please sign in to comment.