Skip to content

Commit

Permalink
use new Git::config_path() for aliasesfile
Browse files Browse the repository at this point in the history
Signed-off-by: Cord Seele <cowose@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Cord Seele authored and Junio C Hamano committed Sep 30, 2011
1 parent 9fef9e2 commit cec5dae
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion git-send-email.perl
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,6 @@ sub do_edit {
"cccmd" => \$cc_cmd,
"aliasfiletype" => \$aliasfiletype,
"bcc" => \@bcclist,
"aliasesfile" => \@alias_files,
"suppresscc" => \@suppress_cc,
"envelopesender" => \$envelope_sender,
"multiedit" => \$multiedit,
Expand All @@ -234,6 +233,10 @@ sub do_edit {
"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 &&
Expand Down Expand Up @@ -330,6 +333,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;
Expand Down

0 comments on commit cec5dae

Please sign in to comment.