Docs: send-email's usage text and man page mention same options
[gitweb.git] / git-send-email.perl
index 3564419e81694d84f4ebf036fe0df70277a81a98..9f56162b1a054faffe0f251de6a03544ca2d4223 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.
 
@@ -64,11 +64,11 @@ sub usage {
                   Only used if --compose is also set.  If --compose is not
                  set, this will be prompted for.
 
-   --chain-reply-to If set, the replies will all be to the previous
+   --[no-]chain-reply-to If set, the replies will all be to the previous
                   email sent, rather than to the first email sent.
                   Defaults to on.
 
-   --signed-off-cc Automatically add email addresses that appear in
+   --[no-]signed-off-by-cc Automatically add email addresses that appear in
                  Signed-off-by: or Cc: lines to the cc: list. Defaults to on.
 
    --identity     The configuration identity, a subsection to prioritise over
@@ -95,9 +95,9 @@ sub usage {
                  'cccmd' for the output of the cccmd, or 'all' to suppress
                  all of these.
 
-   --suppress-from Suppress sending emails to yourself. Defaults to off.
+   --[no-]suppress-from Suppress sending emails to yourself. Defaults to off.
 
-   --thread       Specify that the "In-Reply-To:" header should be set on all
+   --[no-]thread       Specify that the "In-Reply-To:" header should be set on all
                   emails. Defaults to on.
 
    --quiet       Make git-send-email less verbose.  One line per email
@@ -773,6 +773,9 @@ sub send_message
                                        $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 +882,7 @@ sub send_message
                                }
                                elsif (/^Content-type:/i) {
                                        $has_content_type = 1;
-                                       if (/charset="?[^ "]+/) {
+                                       if (/charset="?([^ "]+)/) {
                                                $body_encoding = $1;
                                        }
                                        push @xh, $_;