Merge branch 'ab/send-email-transferencoding-fix'
authorJunio C Hamano <gitster@pobox.com>
Thu, 13 Jun 2019 20:18:46 +0000 (13:18 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 13 Jun 2019 20:18:46 +0000 (13:18 -0700)
Since "git send-email" learned to take 'auto' as the value for the
transfer-encoding, it by mistake stopped honoring the values given
to the configuration variables sendemail.transferencoding and/or
sendemail.<ident>.transferencoding. This has been corrected to
(finally) redoing the order of setting the default, reading the
configuration and command line options.

* ab/send-email-transferencoding-fix:
send-email: fix regression in sendemail.identity parsing
send-email: document --no-[to|cc|bcc]
send-email: fix broken transferEncoding tests
send-email: remove cargo-culted multi-patch pattern in tests
send-email: do defaults -> config -> getopt in that order
send-email: rename the @bcclist variable for consistency
send-email: move the read_config() function above getopts

1  2 
Documentation/git-send-email.txt
git-send-email.perl
t/t9001-send-email.sh
Simple merge
index 24859a7bc37b05909cf16554c102cadc842c13ff,474598339e260fb9d63be63d148594940fb6caf4..5f92c89c1c1be5ba2fadedd1d7a8d013fb7577fd
@@@ -319,9 -393,8 +401,9 @@@ undef $identity if $no_identity
  # needing, first, from the command line:
  
  my $help;
- my $rc = GetOptions("h" => \$help,
-                     "dump-aliases" => \$dump_aliases);
 +my $git_completion_helper;
+ $rc = GetOptions("h" => \$help,
+                  "dump-aliases" => \$dump_aliases);
  usage() unless $rc;
  die __("--dump-aliases incompatible with other options\n")
      if !$help and $dump_aliases and @ARGV;
@@@ -350,8 -423,6 +432,7 @@@ $rc = GetOptions
                    "smtp-debug:i" => \$debug_net_smtp,
                    "smtp-domain:s" => \$smtp_domain,
                    "smtp-auth=s" => \$smtp_auth,
-                   "identity=s" => \$identity,
 +                  "no-smtp-auth" => sub {$smtp_auth = 'none'},
                    "annotate!" => \$annotate,
                    "no-annotate" => sub {$annotate = 0},
                    "compose" => \$compose,
                    "no-xmailer" => sub {$use_xmailer = 0},
                    "batch-size=i" => \$batch_size,
                    "relogin-delay=i" => \$relogin_delay,
 +                  "git-completion-helper" => \$git_completion_helper,
         );
  
+ # Munge any "either config or getopt, not both" variables
+ my @initial_to = @getopt_to ? @getopt_to : ($no_to ? () : @config_to);
+ my @initial_cc = @getopt_cc ? @getopt_cc : ($no_cc ? () : @config_cc);
+ my @initial_bcc = @getopt_bcc ? @getopt_bcc : ($no_bcc ? () : @config_bcc);
  usage() if $help;
 +completion_helper() if $git_completion_helper;
  unless ($rc) {
      usage();
  }
Simple merge