git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] send-email: do not prompt for In-Reply-To

From
Drew DeVault <sir@cmpwn.com>
Date
Aug 27, 2020, 17:55 UTC
Message-ID
<20200827175552.132193-1-sir@cmpwn.com>

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: Junio C Hamano
Message 1 of 29 in “send-email: do not prompt for In-Reply-To”
  1. send-email: do not prompt for In-Reply-ToDrew DeVault, Aug 27, 2020
  2. Junio C HamanoAug 27, 2020
  3. Junio C HamanoAug 27, 2020
  4. Drew DeVaultAug 27, 2020
  5. Junio C HamanoAug 27, 2020
  6. Drew DeVaultAug 27, 2020
  7. Carlo Marcelo Arenas BelónAug 27, 2020
  8. Drew DeVaultAug 27, 2020
  9. Carlo Marcelo Arenas BelónAug 27, 2020
  10. Junio C HamanoAug 27, 2020
  11. Drew DeVaultAug 27, 2020
  12. Carlo ArenasAug 27, 2020
  13. Carlo Marcelo Arenas BelónAug 27, 2020
  14. Junio C HamanoAug 27, 2020
  15. Drew DeVaultAug 27, 2020
  16. Drew DeVaultAug 27, 2020
  17. Junio C HamanoAug 28, 2020
  18. Drew DeVaultAug 28, 2020
  19. Raymond E. PascoAug 28, 2020
  20. Drew DeVaultAug 28, 2020
  21. Junio C HamanoAug 27, 2020
  22. Drew DeVaultAug 27, 2020
  23. Drew DeVaultAug 28, 2020
  24. Junio C HamanoAug 28, 2020
  25. Drew DeVaultAug 28, 2020
  26. Junio C HamanoAug 28, 2020
  27. Drew DeVaultAug 28, 2020
  28. Raymond E. PascoAug 28, 2020
  29. Drew DeVaultAug 27, 2020

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.