Skip to content

Commit e91b6c5

Browse files
jrngitster
authored andcommitted
gitattributes: drop support for GIT_ATTR_NOGLOBAL
test-lib sets $HOME to protect against pollution from user settings, so setting GIT_ATTR_NOGLOBAL would be redundant. Simplify by eliminating support for that environment variable altogether. GIT_ATTR_NOGLOBAL was introduced in v1.7.4-rc0~208^2 (Add global and system-wide gitattributes, 2010-09-01) as an undocumented feature for use by the test suite. It never ended up being used (neither within git.git nor in other projects). This patch does not affect GIT_ATTR_NOSYSTEM, which should still be useful. Helped-by: Jeff King <peff@peff.net> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 3c995be commit e91b6c5

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

attr.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,11 +478,6 @@ int git_attr_system(void)
478478
return !git_env_bool("GIT_ATTR_NOSYSTEM", 0);
479479
}
480480

481-
int git_attr_global(void)
482-
{
483-
return !git_env_bool("GIT_ATTR_NOGLOBAL", 0);
484-
}
485-
486481
static int git_attr_config(const char *var, const char *value, void *dummy)
487482
{
488483
if (!strcmp(var, "core.attributesfile"))
@@ -511,7 +506,7 @@ static void bootstrap_attr_stack(void)
511506
}
512507

513508
git_config(git_attr_config, NULL);
514-
if (git_attr_global() && attributes_file) {
509+
if (attributes_file) {
515510
elem = read_attr_from_file(attributes_file, 1);
516511
if (elem) {
517512
elem->origin = NULL;

0 commit comments

Comments
 (0)