git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] send-email: do not prompt for In-Reply-To
@ 2020-08-27 17:55 Drew DeVault
  2020-08-27 19:04 ` Junio C Hamano
  0 siblings, 1 reply; 29+ messages in thread
From: Drew DeVault @ 2020-08-27 17:55 UTC (permalink / raw)
  To: git, Junio C Hamano; +Cc: Drew DeVault

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


^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2020-08-28 21:46 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-27 17:55 [PATCH] send-email: do not prompt for In-Reply-To Drew DeVault
2020-08-27 19:04 ` 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

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).