summaryrefslogtreecommitdiff
path: root/git-send-email.perl
diff options
context:
space:
mode:
authorQuy Tonthat <qtonthat@gmail.com>2006-12-28 01:16:21 +1100
committerJunio C Hamano <junkio@cox.net>2006-12-27 14:18:57 -0800
commit2ef580550460f377af895b09f5870424c0cff8fa (patch)
treec84423366416a02ed4c27d1d1763d46e3d563cdb /git-send-email.perl
parent4aec56d12ba66a321ce8a6db2ab60f81be5ccfc5 (diff)
downloadgit-2ef580550460f377af895b09f5870424c0cff8fa.tar.gz
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 <qtonthat@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-send-email.perl')
-rwxr-xr-xgit-send-email.perl5
1 files changed, 2 insertions, 3 deletions
diff --git a/git-send-email.perl b/git-send-email.perl
index 4c87c20c15..ba39d39384 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++;
}