From: Drew DeVault <sir@cmpwn.com>
To: git@vger.kernel.org, "Junio C Hamano" <gitster@pobox.com>
Cc: Drew DeVault <sir@cmpwn.com>
Subject: [PATCH] send-email: do not prompt for In-Reply-To
Date: Thu, 27 Aug 2020 13:55:52 -0400 [thread overview]
Message-ID: <20200827175552.132193-1-sir@cmpwn.com> (raw)
Most mailing lists prefer that new patchsets and their revisions are
placed into a new thread. Additionally, knowledge of what In-Reply-To
means and where to find the Message-Id to fill in are domain-specific
and confusing to new users. In the niche situations where this is called
for, the --in-reply-to flag is sufficient.
A config option, sendemail.promptInReplyTo, has been added to re-enable
the old behavior.
---
Documentation/config/sendemail.txt | 7 +++++++
git-send-email.perl | 5 ++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/Documentation/config/sendemail.txt b/Documentation/config/sendemail.txt
index cbc5af42fd..34ca8263d0 100644
--- a/Documentation/config/sendemail.txt
+++ b/Documentation/config/sendemail.txt
@@ -66,3 +66,10 @@ sendemail.forbidSendmailVariables::
To avoid common misconfiguration mistakes, linkgit:git-send-email[1]
will abort with a warning if any configuration options for "sendmail"
exist. Set this variable to bypass the check.
+
+sendemail.promptInReplyTo::
+ Previous versions of linkgit:git-send-email[1] would prompt the user to
+ input an In-Reply-To header for every patchset sent. This was removed as
+ the default behavior, being generally undesirable on most mailing lists,
+ and confusing for new users. Set this variable to re-enable the old
+ behavior.
diff --git a/git-send-email.perl b/git-send-email.perl
index 1f425c0809..f3abccef6d 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -251,6 +251,7 @@ sub do_edit {
my $validate = 1;
my $target_xfer_encoding = 'auto';
my $forbid_sendmail_variables = 1;
+my $prompt_in_reply_to = 0;
my %config_bool_settings = (
"thread" => \$thread,
@@ -265,6 +266,7 @@ sub do_edit {
"annotate" => \$annotate,
"xmailer" => \$use_xmailer,
"forbidsendmailvariables" => \$forbid_sendmail_variables,
+ "promptinreplyto" => \$prompt_in_reply_to,
);
my %config_settings = (
@@ -467,6 +469,7 @@ sub read_config {
"batch-size=i" => \$batch_size,
"relogin-delay=i" => \$relogin_delay,
"git-completion-helper" => \$git_completion_helper,
+ "prompt-in-reply-to" => \$prompt_in_reply_to,
);
# Munge any "either config or getopt, not both" variables
@@ -978,7 +981,7 @@ sub expand_one_alias {
@initial_cc = process_address_list(@initial_cc);
@initial_bcc = process_address_list(@initial_bcc);
-if ($thread && !defined $initial_in_reply_to && $prompting) {
+if ($thread && !defined $initial_in_reply_to && $prompting && $prompt_in_reply_to) {
$initial_in_reply_to = ask(
__("Message-ID to be used as In-Reply-To for the first email (if any)? "),
default => "",
--
2.28.0
next reply other threads:[~2020-08-27 17:55 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 17:55 Drew DeVault [this message]
2020-08-27 19:04 ` [PATCH] send-email: do not prompt for In-Reply-To Junio C Hamano
2020-08-27 19:08 ` Junio C Hamano
2020-08-27 19:14 ` Drew DeVault
2020-08-27 19:20 ` Carlo Marcelo Arenas Belón
2020-08-27 19:23 ` Drew DeVault
2020-08-27 19:32 ` Carlo Marcelo Arenas Belón
2020-08-27 19:34 ` Junio C Hamano
2020-08-27 19:34 ` Drew DeVault
2020-08-27 19:46 ` Carlo Arenas
2020-08-27 22:02 ` Carlo Marcelo Arenas Belón
2020-08-27 22:57 ` Junio C Hamano
2020-08-27 22:59 ` Drew DeVault
2020-08-27 23:05 ` Drew DeVault
2020-08-28 1:02 ` Junio C Hamano
2020-08-28 1:10 ` Drew DeVault
2020-08-28 1:44 ` Raymond E. Pasco
2020-08-28 1:56 ` Drew DeVault
2020-08-27 23:23 ` Junio C Hamano
2020-08-27 23:24 ` Drew DeVault
2020-08-28 18:39 ` Drew DeVault
2020-08-28 20:58 ` Raymond E. Pasco
2020-08-28 21:00 ` Junio C Hamano
2020-08-28 21:01 ` Drew DeVault
2020-08-28 21:33 ` Junio C Hamano
2020-08-28 21:35 ` Drew DeVault
2020-08-27 19:21 ` Junio C Hamano
2020-08-27 19:22 ` Drew DeVault
2020-08-27 19:15 ` Drew DeVault
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200827175552.132193-1-sir@cmpwn.com \
--to=sir@cmpwn.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).