Code

cvsimport: skip commits that are too recent
[git.git] / git-send-email.perl
index 1c6d2cc7872ab82020d9dc32ce0086b1d3139e22..ba39d393843733b46f309deb105c90cabcee2cb1 100755 (executable)
@@ -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++;
 }
@@ -230,6 +229,9 @@ if (!defined $initial_reply_to && $prompting) {
        $initial_reply_to =~ s/(^\s+|\s+$)//g;
 }
 
+if (!$smtp_server) {
+       $smtp_server = $repo->config('sendemail.smtpserver');
+}
 if (!$smtp_server) {
        foreach (qw( /usr/sbin/sendmail /usr/lib/sendmail )) {
                if (-x $_) {
@@ -514,7 +516,7 @@ foreach my $t (@files) {
                                                $2, $_) unless $quiet;
                                        push @cc, $2;
                                }
-                               elsif (/^[-A-Za-z]+:\s+\S/) {
+                               elsif (!/^Date:\s/ && /^[-A-Za-z]+:\s+\S/) {
                                        push @xh, $_;
                                }