]> git.ipfire.org Git - thirdparty/git.git/blobdiff - git-send-email.perl
Merge branch 'js/mingw-rename-fix' into maint
[thirdparty/git.git] / git-send-email.perl
index 3564419e81694d84f4ebf036fe0df70277a81a98..18529c76e665e613d9c116e32da6acf31b3eac6a 100755 (executable)
@@ -38,7 +38,7 @@ package main;
 
 sub usage {
        print <<EOT;
-git-send-email [options] <file | directory>...
+git send-email [options] <file | directory>...
 Options:
    --from         Specify the "From:" line of the email to be sent.
 
@@ -407,10 +407,9 @@ for my $f (@ARGV) {
 
                push @files, grep { -f $_ } map { +$f . "/" . $_ }
                                sort readdir(DH);
-
+               closedir(DH);
        } elsif (-f $f or -p $f) {
                push @files, $f;
-
        } else {
                print STDERR "Skipping $f - not found.\n";
        }
@@ -773,6 +772,9 @@ X-Mailer: git-send-email $gitversion
                                        $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;
                                }
@@ -879,7 +881,7 @@ foreach my $t (@files) {
                                }
                                elsif (/^Content-type:/i) {
                                        $has_content_type = 1;
-                                       if (/charset="?[^ "]+/) {
+                                       if (/charset="?([^ "]+)/) {
                                                $body_encoding = $1;
                                        }
                                        push @xh, $_;