Thread (1 message) 1 message, 1 author, 2016-06-15

Re: [PATCH] grep: simple test for operation in a bare repository

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:48:11

René Scharfe [off-list ref] writes:
quoted hunk
There are five more sites in git.c, path.c and setup.c where $GIT_DIR
is set directly with setenv().  I wonder if they should better call
set_git_dir() instead, too.

diff --git a/setup.c b/setup.c
index 710e2f3..5fb9b25 100644
--- a/setup.c
+++ b/setup.c
@@ -406,7 +406,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
 				cwd[offset] = '\0';
 				setenv(GIT_DIR_ENVIRONMENT, cwd, 1);
 			} else
-				setenv(GIT_DIR_ENVIRONMENT, ".", 1);
+				set_git_dir(".");
 			check_repository_format_gently(nongit_ok);
 			return NULL;
 		}
Yeah, shouldn't the other setenv() we see in the context need a similar
change as well?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help