author | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Oct 2011 19:34:05 +0000 (12:34 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 12 Oct 2011 19:34:05 +0000 (12:34 -0700) |
* cs/perl-config-path-send-email:
use new Git::config_path() for aliasesfile
Add Git::config_path()
use new Git::config_path() for aliasesfile
Add Git::config_path()
1 | 2 | |||
---|---|---|---|---|
git-send-email.perl | patch | | diff1 | | diff2 | | blob | history |
diff --combined git-send-email.perl
index 8ded7f5ce3556acf69a2d88e8b9aedae1d5e2da6,f17f7b3995c833d0434a258e18f6aa2d5568637e..91607c5878953d69a8e32731023b2eb727bcc069
--- 1/git-send-email.perl
--- 2/git-send-email.perl
+++ b/git-send-email.perl
"cccmd" => \$cc_cmd,
"aliasfiletype" => \$aliasfiletype,
"bcc" => \@bcclist,
- "aliasesfile" => \@alias_files,
"suppresscc" => \@suppress_cc,
"envelopesender" => \$envelope_sender,
"multiedit" => \$multiedit,
"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 &&
# 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,
"force" => \$force,
);
+usage() if $help;
unless ($rc) {
usage();
}
$$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;
}
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) {