diff --git a/builtin-config.c b/builtin-config.c
index 077d8ef2df4ae38d668293cc35810b39e0488f6b..2b9a4261d4e98281855ce856041eb730565a4869 100644 (file)
--- a/builtin-config.c
+++ b/builtin-config.c
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_);