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

[PATCH] Fix git_setup_directory_gently when GIT_DIR is set

From
Johannes Schindelin <johannes.schindelin@gmx.de>
Date
Jun 5, 2006, 17:46 UTC
Message-ID
<Pine.LNX.4.63.0606051943540.29608@wbgn013.biozentrum.uni-wuerzburg.de>

When calling git_setup_directory_gently, and GIT_DIR was set, it just ignored the variable nongit_ok.

Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
 setup.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/setup.c b/setup.c
index fe7f884..74301c2 100644
--- a/setup.c
+++ b/setup.c
@@ -184,6 +184,10 @@ const char *setup_git_directory_gently(i
 		}
 		return NULL;
 	bad_dir_environ:
+		if (nongit_ok) {
+			*nongit_ok = 1;
+			return NULL;
+		}
 		path[len] = 0;
 		die("Not a git repository: '%s'", path);
 	}
-- 
1.3.3.gdb440-dirty
Next: Junio C Hamano
Message 1 of 8 in “Fix git_setup_directory_gently when GIT_DIR is set”
  1. Fix git_setup_directory_gently when GIT_DIR is setJohannes Schindelin, Jun 5, 2006
  2. Junio C HamanoJun 5, 2006
  3. Johannes SchindelinJun 5, 2006
  4. Junio C HamanoJun 5, 2006
  5. Johannes SchindelinJun 5, 2006
  6. Junio C HamanoJun 5, 2006
  7. Junio C HamanoJun 6, 2006
  8. Johannes SchindelinJun 6, 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.