diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-14 14:25:11 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-14 14:34:13 -0800 |
commit | 1a30582b43e137e16b3486d83bb86b0eb090e13d (patch) | |
tree | 95c98c5307d6752be0a0fa51faaa4e47c2a242aa | |
parent | 753dc384dc2c4ab3e1049f695425cebf41ff7e6b (diff) | |
download | git-1a30582b43e137e16b3486d83bb86b0eb090e13d.tar.gz |
git svn: read global+system config for clone+init
Since $GIT_DIR does not exist when initializing new repositories,
we can follow back to the global and system config files for
git.
The logic for this was originally introduced when
$GIT_DIR/config was the only config file git could read (back
when "git config" was "git repo-config"), so the function is
renamed to "read_git_config" instead of "read_repo_config".
Signed-off-by: Eric Wong <normalperson@yhbt.net>
-rwxr-xr-x | git-svn.perl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/git-svn.perl b/git-svn.perl index 27fbe3063b..ea922ace1d 100755 --- a/git-svn.perl +++ b/git-svn.perl @@ -274,7 +274,7 @@ unless ($cmd && $cmd =~ /(?:clone|init|multi-init)$/) { my %opts = %{$cmd{$cmd}->[2]} if (defined $cmd); -read_repo_config(\%opts); +read_git_config(\%opts); if ($cmd && ($cmd eq 'log' || $cmd eq 'blame')) { Getopt::Long::Configure('pass_through'); } @@ -1390,8 +1390,7 @@ sub load_authors { } # convert GetOpt::Long specs for use by git-config -sub read_repo_config { - return unless -d $ENV{GIT_DIR}; +sub read_git_config { my $opts = shift; my @config_only; foreach my $o (keys %$opts) { |