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

[PATCH] git-send-email: allow an email alias for --from

From
Michael Hendricks <michael@ndrix.org>
Date
Jul 5, 2007, 01:11 UTC
Message-ID
<11835978963177-git-send-email-michael@ndrix.org>
Signed-off-by: Michael Hendricks <michael@ndrix.org>
---

I don't like seeing all the output and confirming the From address when I don't specify --from. Since I have aliases for my own email addresses, this is easier than always typing out the full address.

It also does what I would expect since every other email address can be specified as an alias. Why not From also?

 git-send-email.perl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/git-send-email.perl b/git-send-email.perl
index 87f59fa..89f7c36 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -254,6 +254,8 @@ if (@alias_files and $aliasfiletype and defined $parse_alias{$aliasfiletype}) {
 	}
 }
 
+($from) = expand_aliases($from) if defined $from;
+
 my $prompting = 0;
 if (!defined $from) {
 	$from = $author || $committer;
-- 
1.5.3.rc0.14.gebe8f
Next: Junio C Hamano
Message 1 of 2 in “git-send-email: allow an email alias for --from”
  1. git-send-email: allow an email alias for --fromMichael Hendricks, Jul 5, 2007
  2. Junio C HamanoJul 6, 2007

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.