diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-02-16 17:56:51 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-02-16 17:56:51 -0800 |
commit | fef1c4c0a0766b83cfacaf6276d7bd0d1aa9a2e4 (patch) | |
tree | a3c4cf94132da5755e874ef44bd8072d679ba0c8 /builtin-config.c | |
parent | 093d50e0d226b879e24753ce18f4eb4b754807c6 (diff) | |
parent | 8bfa6bd6473b086ab2c5781daa08a7b5417c3d1f (diff) | |
download | git-fef1c4c0a0766b83cfacaf6276d7bd0d1aa9a2e4.tar.gz |
Merge branch 'jk/noetcconfig'
* jk/noetcconfig:
fix config reading in tests
allow suppressing of global and system config
Conflicts:
cache.h
Diffstat (limited to 'builtin-config.c')
-rw-r--r-- | builtin-config.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/builtin-config.c b/builtin-config.c index 077d8ef2df..2b9a4261d4 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_); |