X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=builtin-config.c;h=2b9a4261d4e98281855ce856041eb730565a4869;hb=660b9c3a4e24ce9a2628f2ec88902e2384d1aade;hp=077d8ef2df4ae38d668293cc35810b39e0488f6b;hpb=67cdec1e58f1f9bc17d500b04e856042e0b2bf59;p=git.git diff --git a/builtin-config.c b/builtin-config.c index 077d8ef2d..2b9a4261d 100644 --- a/builtin-config.c +++ b/builtin-config.c @@ -79,9 +79,10 @@ static int get_value(const char* key_, const char* regex_) local = getenv(CONFIG_LOCAL_ENVIRONMENT); if (!local) local = repo_config = xstrdup(git_path("config")); - if (home) + if (git_config_global() && home) global = xstrdup(mkpath("%s/.gitconfig", home)); - system_wide = git_etc_gitconfig(); + if (git_config_system()) + system_wide = git_etc_gitconfig(); } key = xstrdup(key_);