@matheusbsbs / matheus-bagliano / commits / 2ef5805504
Fork 0

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>

Quy Tonthat committed Dec 28, 2006 at 01:16 UTC 2ef580550460f377af895b09f5870424c0cff8fa
1 file changed +2 -3
git-send-email.perl
+2 -3
@@ -178,11 +178,10 @@ my $prompting = 0;
178 if (!defined $from) {
179 $from = $author || $committer;
180 do {
181 - $_ = $term->readline("Who should the emails appear to be from? ",
182 - $from);
181 + $_ = $term->readline("Who should the emails appear to be from? [$from] ");
182 } while (!defined $_);
183
185 - $from = $_;
184 + $from = $_ if ($_);
185 print "Emails will be sent from: ", $from, "\n";
186 $prompting++;
187 }