Code

Merge branch 'sp/maint-index-pack'
[git.git] / git-send-email.perl
index edb12c2aaaa64a13d0c59f8432d2ddd7d1cf75bd..6adb66947279e290d90be7da154f49e696894528 100755 (executable)
@@ -408,7 +408,7 @@ for my $f (@ARGV) {
                push @files, grep { -f $_ } map { +$f . "/" . $_ }
                                sort readdir(DH);
 
-       } elsif (-f $f) {
+       } elsif (-f $f or -p $f) {
                push @files, $f;
 
        } else {
@@ -418,8 +418,10 @@ for my $f (@ARGV) {
 
 if (!$no_validate) {
        foreach my $f (@files) {
-               my $error = validate_patch($f);
-               $error and die "fatal: $f: $error\nwarning: no patches were sent\n";
+               unless (-p $f) {
+                       my $error = validate_patch($f);
+                       $error and die "fatal: $f: $error\nwarning: no patches were sent\n";
+               }
        }
 }
 
@@ -770,6 +772,10 @@ X-Mailer: git-send-email $gitversion
                                if ($smtp->code == 220) {
                                        $smtp = Net::SMTP::SSL->start_SSL($smtp)
                                                or die "STARTTLS failed! ".$smtp->message;
+                                       $smtp_encryption = '';
+                                       # Send EHLO again to receive fresh
+                                       # supported commands
+                                       $smtp->hello();
                                } else {
                                        die "Server does not support STARTTLS! ".$smtp->message;
                                }