X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=git-send-email.perl;h=d491db92c9379cf0eea63182dd704feb6582b6e7;hb=4df989f9537cc9f168e96da7700f012b6367c63f;hp=5790744ae3fd89f83a229f964a5603df94e05c83;hpb=7857e3246fef2fdfa3c0fc645cd3d72ff3e6572b;p=git.git diff --git a/git-send-email.perl b/git-send-email.perl index 5790744ae..d491db92c 100755 --- a/git-send-email.perl +++ b/git-send-email.perl @@ -225,7 +225,6 @@ my %config_settings = ( "cccmd" => \$cc_cmd, "aliasfiletype" => \$aliasfiletype, "bcc" => \@bcclist, - "aliasesfile" => \@alias_files, "suppresscc" => \@suppress_cc, "envelopesender" => \$envelope_sender, "multiedit" => \$multiedit, @@ -234,6 +233,10 @@ my %config_settings = ( "assume8bitencoding" => \$auto_8bit_encoding, ); +my %config_path_settings = ( + "aliasesfile" => \@alias_files, +); + # Help users prepare for 1.7.0 sub chain_reply_to { if (defined $chain_reply_to && @@ -275,7 +278,9 @@ $SIG{INT} = \&signal_handler; # Begin by accumulating all the variables (defined above), that we will end up # needing, first, from the command line: -my $rc = GetOptions("sender|from=s" => \$sender, +my $help; +my $rc = GetOptions("h" => \$help, + "sender|from=s" => \$sender, "in-reply-to=s" => \$initial_reply_to, "subject=s" => \$initial_subject, "to=s" => \@initial_to, @@ -313,6 +318,7 @@ my $rc = GetOptions("sender|from=s" => \$sender, "force" => \$force, ); +usage() if $help; unless ($rc) { usage(); } @@ -330,6 +336,19 @@ sub read_config { $$target = Git::config_bool(@repo, "$prefix.$setting") unless (defined $$target); } + foreach my $setting (keys %config_path_settings) { + my $target = $config_path_settings{$setting}; + if (ref($target) eq "ARRAY") { + unless (@$target) { + my @values = Git::config_path(@repo, "$prefix.$setting"); + @$target = @values if (@values && defined $values[0]); + } + } + else { + $$target = Git::config_path(@repo, "$prefix.$setting") unless (defined $$target); + } + } + foreach my $setting (keys %config_settings) { my $target = $config_settings{$setting}; next if $setting eq "to" and defined $no_to; @@ -1095,6 +1114,12 @@ X-Mailer: git-send-email $gitversion } if (defined $smtp_authuser) { + # Workaround AUTH PLAIN/LOGIN interaction defect + # with Authen::SASL::Cyrus + eval { + require Authen::SASL; + Authen::SASL->import(qw(Perl)); + }; if (!defined $smtp_authpass) {