Skip to contentSkip to conversation

git-send-email: allow an email alias for --from

PATCH In review Michael Hendricks 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 git-send-email: allow an email alias for --from

---

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(-)
git-send-email.perl +2 -0
index 87f59fa..89f7c36 100755
@@ -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;
Signature · 1 line
1.5.3.rc0.14.gebe8f