From: Jonathan Nieder <jrnieder@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org, Junio C Hamano <gitster@pobox.com>,
Petr Onderka <gsvick@gmail.com>
Subject: [PATCH 1/3] gitattributes: drop support for GIT_ATTR_NOGLOBAL
Date: Tue, 15 Mar 2011 04:04:15 -0500 [thread overview]
Message-ID: <20110315090415.GB1576@elie> (raw)
In-Reply-To: <20110315090225.GA1576@elie>
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>
---
attr.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/attr.c b/attr.c
index 6aff695..0e28ba8 100644
--- a/attr.c
+++ b/attr.c
@@ -478,11 +478,6 @@ int git_attr_system(void)
return !git_env_bool("GIT_ATTR_NOSYSTEM", 0);
}
-int git_attr_global(void)
-{
- return !git_env_bool("GIT_ATTR_NOGLOBAL", 0);
-}
-
static int git_attr_config(const char *var, const char *value, void *dummy)
{
if (!strcmp(var, "core.attributesfile"))
@@ -511,7 +506,7 @@ static void bootstrap_attr_stack(void)
}
git_config(git_attr_config, NULL);
- if (git_attr_global() && attributes_file) {
+ if (attributes_file) {
elem = read_attr_from_file(attributes_file, 1);
if (elem) {
elem->origin = NULL;
--
1.7.4.1
next prev parent reply other threads:[~2011-03-15 9:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-15 6:49 [PATCH 0/3] tests: unsetting variables that influence the outcome Jonathan Nieder
2011-03-15 6:56 ` [PATCH 1/3] tests: protect against GIT_ATTR_NOGLOBAL from environment Jonathan Nieder
2011-03-15 6:56 ` [PATCH 2/3] tests: suppress global and system gitattributes Jonathan Nieder
2011-03-15 7:16 ` Jeff King
2011-03-15 9:02 ` [PATCH 1-2/3 v2 0/3] " Jonathan Nieder
2011-03-15 9:04 ` Jonathan Nieder [this message]
2011-03-15 9:04 ` [PATCH 2/3] config: drop support for GIT_CONFIG_NOGLOBAL Jonathan Nieder
2011-03-15 9:05 ` [PATCH 3/3] tests: suppress system gitattributes Jonathan Nieder
2011-03-15 7:04 ` [PATCH 3/3] tests: scrub environment of GIT_* variables Jonathan Nieder
2011-03-15 7:37 ` Jeff King
2011-03-15 10:08 ` [RFC/PATCH 0/2] tests: stop hard-coding the list of GIT_* vars to scrub Jonathan Nieder
2011-03-15 10:09 ` [PATCH 1/2] tests: stop worrying about obsolete environment variables Jonathan Nieder
2011-03-15 10:10 ` [RFC/PATCH 2/2] tests: scrub environment of GIT_* variables Jonathan Nieder
2011-03-15 17:20 ` Junio C Hamano
2011-03-15 20:01 ` Jeff King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110315090415.GB1576@elie \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=gsvick@gmail.com \
--cc=peff@peff.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).