X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-send-email.perl;h=d2fd89907688a044ffe0d2520744e00a9b33c942;hb=53b543ab8218cede7fb9383298c00dcef663692c;hp=edb12c2aaaa64a13d0c59f8432d2ddd7d1cf75bd;hpb=fa835cd5728411bfd8f851e7327e11ad809a59d1;p=git.git diff --git a/git-send-email.perl b/git-send-email.perl index edb12c2aa..d2fd89907 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -38,7 +38,7 @@ package main; sub usage { print <... +git send-email [options] ... Options: --from Specify the "From:" line of the email to be sent. @@ -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; } @@ -876,7 +882,7 @@ foreach my $t (@files) { } elsif (/^Content-type:/i) { $has_content_type = 1; - if (/charset="?[^ "]+/) { + if (/charset="?([^ "]+)/) { $body_encoding = $1; } push @xh, $_;