fsck: git receive-pack: support excluding objects from fsck'ing
[gitweb.git] / git-send-email.perl
index 3092ab356c765cd593d2a988d020665c8b626ea1..6bedf745e72d3935f7feaae2cfca95d44a3e6df5 100755 (executable)
@@ -299,6 +299,7 @@ sub signal_handler {
                    "bcc=s" => \@bcclist,
                    "no-bcc" => \$no_bcc,
                    "chain-reply-to!" => \$chain_reply_to,
+                   "no-chain-reply-to" => sub {$chain_reply_to = 0},
                    "smtp-server=s" => \$smtp_server,
                    "smtp-server-option=s" => \@smtp_server_options,
                    "smtp-server-port=s" => \$smtp_server_port,
@@ -311,25 +312,34 @@ sub signal_handler {
                    "smtp-domain:s" => \$smtp_domain,
                    "identity=s" => \$identity,
                    "annotate!" => \$annotate,
+                   "no-annotate" => sub {$annotate = 0},
                    "compose" => \$compose,
                    "quiet" => \$quiet,
                    "cc-cmd=s" => \$cc_cmd,
                    "suppress-from!" => \$suppress_from,
+                   "no-suppress-from" => sub {$suppress_from = 0},
                    "suppress-cc=s" => \@suppress_cc,
                    "signed-off-cc|signed-off-by-cc!" => \$signed_off_by_cc,
+                   "no-signed-off-cc|no-signed-off-by-cc" => sub {$signed_off_by_cc = 0},
                    "cc-cover|cc-cover!" => \$cover_cc,
+                   "no-cc-cover" => sub {$cover_cc = 0},
                    "to-cover|to-cover!" => \$cover_to,
+                   "no-to-cover" => sub {$cover_to = 0},
                    "confirm=s" => \$confirm,
                    "dry-run" => \$dry_run,
                    "envelope-sender=s" => \$envelope_sender,
                    "thread!" => \$thread,
+                   "no-thread" => sub {$thread = 0},
                    "validate!" => \$validate,
+                   "no-validate" => sub {$validate = 0},
                    "transfer-encoding=s" => \$target_xfer_encoding,
                    "format-patch!" => \$format_patch,
+                   "no-format-patch" => sub {$format_patch = 0},
                    "8bit-encoding=s" => \$auto_8bit_encoding,
                    "compose-encoding=s" => \$compose_encoding,
                    "force" => \$force,
                    "xmailer!" => \$use_xmailer,
+                   "no-xmailer" => sub {$use_xmailer = 0},
         );
 
 usage() if $help;
@@ -506,6 +516,31 @@ sub split_addrs {
                          }
                      } },
 
+       sendmail => sub { my $fh = shift; while (<$fh>) {
+               # ignore blank lines and comment lines
+               if (/^\s*(?:#.*)?$/) { }
+
+               # warn on lines that contain quotes
+               elsif (/"/) {
+                       print STDERR "sendmail alias with quotes is not supported: $_\n";
+               }
+
+               # warn on lines that continue
+               elsif (/^\s|\\$/) {
+                       print STDERR "sendmail continuation line is not supported: $_\n";
+               }
+
+               # recognize lines that look like an alias
+               elsif (/^(\S+?)\s*:\s*(.+)$/) {
+                       my ($alias, $addr) = ($1, $2);
+                       $aliases{$alias} = [ split_addrs($addr) ];
+               }
+
+               # warn on lines that are not recognized
+               else {
+                       print STDERR "sendmail line is not recognized: $_\n";
+               }}},
+
        gnus => sub { my $fh = shift; while (<$fh>) {
                if (/\(define-mail-alias\s+"(\S+?)"\s+"(\S+?)"\)/) {
                        $aliases{$1} = [ $2 ];
@@ -752,6 +787,7 @@ sub file_declares_8bit_cte {
                print "    $f\n";
        }
        $auto_8bit_encoding = ask("Which 8bit encoding should I declare [UTF-8]? ",
+                                 valid_re => qr/.{4}/, confirm_only => 1,
                                  default => "UTF-8");
 }