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

[PATCH] send-email: Ask for in-reply message ID even if from and to is already known

From
ASAlexander Stein <alexander.stein@informatik.tu-chemnitz.de>
Date
Jun 1, 2010, 18:08 UTC
Message-ID
<1275415730-15360-1-git-send-email-alexander.stein@informatik.tu-chemnitz.de>
In-Reply-To
<vpqtypmn4bm.fsf@bauges.imag.fr>

This patch removes the prompting variable so git send-email always asks for a in-reply message ID (unless specified on command line) even when sendemail.from and sendemail.to is set in ~/.gitconfig or .git/config

Signed-off-by: Alexander Stein <alexander.stein@informatik.tu-chemnitz.de>
---
 git-send-email.perl |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 111c981..4487472 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -136,7 +136,7 @@ my $auth;
 sub unique_email_list(@);
 sub cleanup_compose_files();
 
-# Variables we fill in automatically, or via prompting:
+# Variables we fill in automatically:
 my (@to,$no_to,@cc,$no_cc,@initial_cc,@bcclist,$no_bcc,@xh,
 	$initial_reply_to,$initial_subject,@files,
 	$author,$sender,$smtp_authpass,$annotate,$compose,$time);
@@ -669,19 +669,16 @@ sub ask {
 	return undef;
 }
 
-my $prompting = 0;
 if (!defined $sender) {
 	$sender = $repoauthor || $repocommitter || '';
 	$sender = ask("Who should the emails appear to be from? [$sender] ",
 	              default => $sender);
 	print "Emails will be sent from: ", $sender, "\n";
-	$prompting++;
 }
 
 if (!@to) {
 	my $to = ask("Who should the emails be sent to? ");
 	push @to, parse_address_line($to) if defined $to; # sanitized/validated later
-	$prompting++;
 }
 
 sub expand_aliases {
@@ -703,7 +700,7 @@ sub expand_one_alias {
 @initial_cc = expand_aliases(@initial_cc);
 @bcclist = expand_aliases(@bcclist);
 
-if ($thread && !defined $initial_reply_to && $prompting) {
+if ($thread && !defined $initial_reply_to) {
 	$initial_reply_to = ask(
 		"Message-ID to be used as In-Reply-To for the first email? ");
 }
-- 
1.6.4.4
Previous: Matthieu MoyNext: Alexander Stein
Message 3 of 8 in “git send-email should always ask for in-reply-to”
  1. Alexander SteinJun 1, 2010
  2. Matthieu MoyJun 1, 2010
  3. send-email: Ask for in-reply message ID even if from and to is already knownAlexander Stein, Jun 1, 2010
  4. Alexander SteinJun 10, 2010
  5. Ævar Arnfjörð BjarmasonJun 10, 2010
  6. Junio C HamanoJun 11, 2010
  7. Alexander SteinJun 11, 2010
  8. Matthieu MoyJun 10, 2010

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.