Merge branch 'jn/test-sanitize-git-env'

* jn/test-sanitize-git-env:
  tests: scrub environment of GIT_* variables
  config: drop support for GIT_CONFIG_NOGLOBAL
  gitattributes: drop support for GIT_ATTR_NOGLOBAL
  tests: suppress system gitattributes
  tests: stop worrying about obsolete environment variables
This commit is contained in:
Junio C Hamano
2011-03-22 21:38:12 -07:00
8 changed files with 11 additions and 47 deletions

View File

@ -825,11 +825,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;
@ -861,7 +856,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);