From: Junio C Hamano Date: Wed, 12 Oct 2011 19:34:05 +0000 (-0700) Subject: Merge branch 'cs/perl-config-path-send-email' X-Git-Tag: v1.7.8-rc0~98 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1ff5a41b6bfb250d2d055159caa9e00e008bc9d5?ds=inline;hp=-c Merge branch 'cs/perl-config-path-send-email' * cs/perl-config-path-send-email: use new Git::config_path() for aliasesfile Add Git::config_path() --- 1ff5a41b6bfb250d2d055159caa9e00e008bc9d5 diff --combined git-send-email.perl index 8ded7f5ce3,f17f7b3995..91607c5878 --- a/git-send-email.perl +++ b/git-send-email.perl @@@ -225,7 -225,6 +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 +233,10 @@@ "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,9 -278,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, @@@ -315,7 -316,6 +318,7 @@@ "force" => \$force, ); +usage() if $help; unless ($rc) { usage(); } @@@ -333,6 -333,11 +336,11 @@@ 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}->[0]; + $$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; @@@ -1098,12 -1103,6 +1106,12 @@@ X-Mailer: git-send-email $gitversio } 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) {