allow getting config settings for non-existant repos also

It's reasonable to want to see config items (for example, mirror
settings) that *would* apply if the repo existed.
redis
Sitaram Chamarty 2012-06-01 05:24:27 +05:30
parent 7170ad9124
commit d9df70a04f
1 changed files with 5 additions and 2 deletions

View File

@ -119,8 +119,11 @@ sub git_config {
my ( $repo, $key, $empty_values_OK ) = @_;
$key ||= '.';
return {} if repo_missing($repo);
load($repo);
if (repo_missing($repo)) {
load_common();
} else {
load($repo);
}
# read comments bottom up
my %ret =