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>
maint
Quy Tonthat 2006-12-28 01:16:21 +11:00 committed by Junio C Hamano
parent 4aec56d12b
commit 2ef5805504
1 changed files with 2 additions and 3 deletions

View File

@ -178,11 +178,10 @@ my $prompting = 0;
if (!defined $from) { if (!defined $from) {
$from = $author || $committer; $from = $author || $committer;
do { do {
$_ = $term->readline("Who should the emails appear to be from? ", $_ = $term->readline("Who should the emails appear to be from? [$from] ");
$from);
} while (!defined $_); } while (!defined $_);


$from = $_; $from = $_ if ($_);
print "Emails will be sent from: ", $from, "\n"; print "Emails will be sent from: ", $from, "\n";
$prompting++; $prompting++;
} }