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

[PATCH] repo-config: Fix late-night bug

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 20, 2006, 07:45 UTC
Message-ID
<Pine.LNX.4.63.0606200945140.26329@wbgn013.biozentrum.uni-wuerzburg.de>
This bug was hidden by the "future-proofing" of the test. Sigh.

When neither GIT_CONFIG nor GIT_CONFIG_LOCAL is set, do not use NULL, but $GIT_DIR/config. Instead of using $GIT_DIR/config when only GIT_CONFIG_LOCAL is set. Sorry.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
	This time, "only" repo-config was affected, _not_ all users of
	the config file.
 repo-config.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/repo-config.c b/repo-config.c
index 03f108f..ab8f1af 100644
--- a/repo-config.c
+++ b/repo-config.c
@@ -74,8 +74,6 @@ static int get_value(const char* key_, c
 		const char *home = getenv("HOME");
 		local = getenv("GIT_CONFIG_LOCAL");
 		if (!local)
-			local = repo_config;
-		else
 			local = repo_config = strdup(git_path("config"));
 		if (home)
 			global = strdup(mkpath("%s/.gitconfig", home));
-- 
1.4.0.g59268-dirty
Message 1 of 1 in “repo-config: Fix late-night bug”
  1. repo-config: Fix late-night bugJohannes Schindelin, Jun 20, 2006

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.