From: Quy Tonthat Date: Wed, 27 Dec 2006 14:16:21 +0000 (+1100) Subject: git-send-email: default value for "From:" field. X-Git-Tag: v1.5.0-rc1~184 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2ef580550460f377af895b09f5870424c0cff8fa;p=git.git git-send-email: default value for "From:" field. If user hits enter at the prompt for "Who should the emails appear to be from?", the value for "From:" field was emptied instead of GIT_COMMITER_IDENT. Signed-off-by: Quy Tonthat Signed-off-by: Junio C Hamano --- diff --git a/git-send-email.perl b/git-send-email.perl index 4c87c20c1..ba39d3938 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -178,11 +178,10 @@ my $prompting = 0; if (!defined $from) { $from = $author || $committer; do { - $_ = $term->readline("Who should the emails appear to be from? ", - $from); + $_ = $term->readline("Who should the emails appear to be from? [$from] "); } while (!defined $_); - $from = $_; + $from = $_ if ($_); print "Emails will be sent from: ", $from, "\n"; $prompting++; }