# [PATCH] Documentation: mention environment variables GIT_CONFIG_NO(GLOBAL|SYSTEM)

4 messages from 2010-10-03 to 2010-10-04. Participants: Jan Krüger, Sverre Rabbelier, Junio C Hamano.
Thread: https://gitlist.dev/t/25325

## Jan Krüger, 2010-10-03 21:53

Subject: [PATCH] Documentation: mention environment variables GIT_CONFIG_NO(GLOBAL|SYSTEM)
Message-ID: <20101003235329.6f4d2572@jk.gs>
URL: https://gitlist.dev/e/20101003235329.6f4d2572%40jk.gs

```
The environment variables GIT_CONFIG_NOGLOBAL and GIT_CONFIG_NOSYSTEM
which have the opposite effect of the --global and --system switches to
git-config are completely undocumented. This mentions them in the
'files' and 'environment' sections of the manpage for git-config where
GIT_CONFIG is already mentioned.

Signed-off-by: Jan Krüger <jk@jk.gs>
---
 Documentation/git-config.txt |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index 543dd64..c3ea29c 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -210,6 +210,9 @@ variables. The '--global' and the '--system' options will limit the file used
 to the global or system-wide file respectively. The GIT_CONFIG environment
 variable has a similar effect, but you can specify any filename you want.
 
+You can also set the environment GIT_CONFIG_NOGLOBAL and GIT_CONFIG_NOSYSTEM
+to explicitly prevent git from falling back to global/system settings.
+
 
 ENVIRONMENT
 -----------
@@ -219,6 +222,14 @@ GIT_CONFIG::
 	Using the "--global" option forces this to ~/.gitconfig. Using the
 	"--system" option forces this to $(prefix)/etc/gitconfig.
 
+GIT_CONFIG_NOGLOBAL::
+	If set to true, do not use the global configuration file
+	in ~/.gitconfig.
+
+GIT_CONFIG_NOSYSTEM::
+	If set to true, do not use the system-wide configuration file in
+	/etc/gitconfig.
+
 See also <<FILES>>.
 
 
-- 
1.7.2.3.392.g02377.dirty

```

## Sverre Rabbelier, 2010-10-03 23:10

Subject: Re: [PATCH] Documentation: mention environment variables GIT_CONFIG_NO(GLOBAL|SYSTEM)
Message-ID: <AANLkTimkDEff5dzO+PDR44vSq9JQ7Junj+Lwm30Fy1Vr@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimkDEff5dzO%2BPDR44vSq9JQ7Junj%2BLwm30Fy1Vr%40mail.gmail.com
In-Reply-To: <20101003235329.6f4d2572@jk.gs>

```
Heya,

On Sun, Oct 3, 2010 at 23:53, Jan Krüger <jk@jk.gs> wrote:
> The environment variables GIT_CONFIG_NOGLOBAL and GIT_CONFIG_NOSYSTEM
> which have the opposite effect of the --global and --system switches to
> git-config are completely undocumented. This mentions them in the
> 'files' and 'environment' sections of the manpage for git-config where
> GIT_CONFIG is already mentioned.

Nice.

> +GIT_CONFIG_NOGLOBAL::
> +       If set to true, do not use the global configuration file
> +       in ~/.gitconfig.
> +
> +GIT_CONFIG_NOSYSTEM::
> +       If set to true, do not use the system-wide configuration file in
> +       /etc/gitconfig.
> +

If there are a '--no-global' and '--no-system', would it good to
mention those too? Something like: "If set to true, do not use the
system-wide configuration file in /etc/gitconfig, equivalent to
--no-global."?

-- 
Cheers,

Sverre Rabbelier

```

## Junio C Hamano, 2010-10-03 23:27

Subject: Re: [PATCH] Documentation: mention environment variables GIT_CONFIG_NO(GLOBAL|SYSTEM)
Message-ID: <7vvd5ieu29.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vvd5ieu29.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20101003235329.6f4d2572@jk.gs>

```
Jan Krüger <jk@jk.gs> writes:

> The environment variables GIT_CONFIG_NOGLOBAL and GIT_CONFIG_NOSYSTEM
> which have the opposite effect of the --global and --system switches to
> git-config are completely undocumented. This mentions them in the
> 'files' and 'environment' sections of the manpage for git-config where
> GIT_CONFIG is already mentioned.
>
> Signed-off-by: Jan Krüger <jk@jk.gs>

Aren't they undocumented because the use case for them is pretty much
limited to the test scripts and nowhere else?  I am not absolutely sure
about GIT_CONFIG_NOGLOBAL, but NOSYSTEM surely was started that way.

```

## Jan Krüger, 2010-10-04 06:31

Subject: Re: [PATCH] Documentation: mention environment variables GIT_CONFIG_NO(GLOBAL|SYSTEM)
Message-ID: <20101004083106.74623cd5@jk.gs>
URL: https://gitlist.dev/e/20101004083106.74623cd5%40jk.gs
In-Reply-To: <7vvd5ieu29.fsf@alter.siamese.dyndns.org>

```
--- Junio C Hamano <gitster@pobox.com> wrote:

> Aren't they undocumented because the use case for them is pretty much
> limited to the test scripts and nowhere else?  I am not absolutely
> sure about GIT_CONFIG_NOGLOBAL, but NOSYSTEM surely was started that
> way.

I don't know. I found them when someone on IRC was looking for a way to
bypass an insteadOf setting in his ~/.gitconfig file, so I guess that
there is an actual use case for some.

-Jan

```
