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>
This commit is contained in:
Jonathan Nieder
2011-03-15 04:04:49 -05:00
committed by Junio C Hamano
parent e91b6c5049
commit 8f323c00dd
7 changed files with 4 additions and 16 deletions

View File

@ -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);