Skip to content

Commit

Permalink
git-send-email: default value for "From:" field.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Quy Tonthat authored and Junio C Hamano committed Dec 27, 2006
1 parent 4aec56d commit 2ef5805
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,10 @@ sub format_2822_time {
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++;
}
Expand Down

0 comments on commit 2ef5805

Please sign in to comment.