summaryrefslogtreecommitdiff
path: root/config.c
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2011-03-15 04:04:49 -0500
committerJunio C Hamano <gitster@pobox.com>2011-03-15 12:23:30 -0700
commit8f323c00dd3c9b396b01a1aeea74f7dfd061bb7f (patch)
treef3f33e362aafcbac2374252026ccbda07508bdc0 /config.c
parente91b6c504961a147f0ab4e2fc05be914f881290a (diff)
downloadgit-8f323c00dd3c9b396b01a1aeea74f7dfd061bb7f.tar.gz
config: drop support for GIT_CONFIG_NOGLOBAL
Now that test-lib sets $HOME to protect against pollution from user settings, GIT_CONFIG_NOGLOBAL is not needed for use by the test suite any more. And as luck would have it, a quick code search reveals no other users in the wild. This patch does not affect GIT_CONFIG_NOSYSTEM, which is still needed. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'config.c')
-rw-r--r--config.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/config.c b/config.c
index b94de8f51c..217a77ddaf 100644
--- a/config.c
+++ b/config.c
@@ -826,11 +826,6 @@ int git_config_system(void)
return !git_env_bool("GIT_CONFIG_NOSYSTEM", 0);
}
-int git_config_global(void)
-{
- return !git_env_bool("GIT_CONFIG_NOGLOBAL", 0);
-}
-
int git_config_from_parameters(config_fn_t fn, void *data)
{
static int loaded_environment;
@@ -862,7 +857,7 @@ int git_config_early(config_fn_t fn, void *data, const char *repo_config)
}
home = getenv("HOME");
- if (git_config_global() && home) {
+ if (home) {
char *user_config = xstrdup(mkpath("%s/.gitconfig", home));
if (!access(user_config, R_OK)) {
ret += git_config_from_file(fn, user_config, data);