git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/2] config doc: advertise GIT_CONFIG_NOSYSTEM

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Oct 14, 2012, 08:44 UTC
Message-ID
<20121014084437.GB7190@elie.Belkin>
In-Reply-To
<20121014084244.GA7190@elie.Belkin>

When a syntax error or other problem renders /etc/gitconfig buggy on a multiuser system where mortals do not have write access to /etc, the GIT_CONFIG_NOSYSTEM variable is the best tool we have to keep getting work done until the sysadmin sorts the problem out.

Noticed while experimenting with teaching git to error out when /etc/gitconfig is unreadable.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
---
 Documentation/git-config.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
diff --git a/Documentation/git-config.txt b/Documentation/git-config.txt
index eaea0791..907a1fd5 100644
--- a/Documentation/git-config.txt
+++ b/Documentation/git-config.txt
@@ -240,6 +240,14 @@ GIT_CONFIG::
 	Using the "--global" option forces this to ~/.gitconfig. Using the
 	"--system" option forces this to $(prefix)/etc/gitconfig.
 
+GIT_CONFIG_NOSYSTEM::
+	Whether to skip reading settings from the system-wide
+	$(prefix)/etc/gitconfig file.  This environment variable can
+	be used along with HOME and XDG_CONFIG_HOME to create a
+	predictable environment for a picky script, or you can set it
+	temporarily to avoid using a buggy /etc/gitconfig file while
+	waiting for someone with sufficient permissions to fix it.
+
 See also <<FILES>>.
 
 
-- 
1.8.0.rc2
Previous: Jonathan NiederNext: Jonathan Nieder
Message 6 of 13 in “Re: [PATCH] config: warn on inaccessible files”
  1. 0/2 Re: [PATCH] config: warn on inaccessible filesJonathan Nieder, Oct 14, 2012
  2. 1/2 config, gitignore: failure to access with ENOTDIR is okJonathan Nieder, Oct 14, 2012
  3. 2/2 config: treat user and xdg config permission problems as errorsJonathan Nieder, Oct 14, 2012
  4. Jeff KingOct 14, 2012
  5. Jonathan NiederOct 14, 2012
  6. 3/2 config doc: advertise GIT_CONFIG_NOSYSTEMJonathan Nieder, Oct 14, 2012
  7. 3/2 doc: advertise GIT_CONFIG_NOSYSTEMJonathan Nieder, Oct 14, 2012
  8. 4/2 config: exit on error accessing any config fileJonathan Nieder, Oct 14, 2012
  9. Jeff KingOct 14, 2012
  10. Junio C HamanoOct 14, 2012
  11. Jeff KingOct 14, 2012
  12. Jonathan NiederOct 14, 2012
  13. Jeff KingOct 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.