Thread (10 messages) flat view 10 messages, 4 authors, 2016-06-15

Re: [PATCH 3/3] setup: always honor GIT_WORK_TREE and core.worktree

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:50:26

Possibly related (same subject, not in this thread)

Jonathan Nieder wrote:
quoted hunk ↗ jump to hunk
--- a/setup.c
+++ b/setup.c
@@ -509,8 +532,10 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
 	 * validation.
 	 */
 	gitdirenv = getenv(GIT_DIR_ENVIRONMENT);
-	if (gitdirenv)
+	if (gitdirenv) {
+		trace_printf("trace: gitdirenv = %s\n", gitdirenv);
 		return setup_explicit_git_dir(gitdirenv, cwd, len, nongit_ok);
+	}
 
The above hunk is a debugging remnant.  I suppose it was foolish to
send out the series so late.  Probably not such a big deal since the
problem Maaartin mentioned remains anyway (that is, the warning is
still confusing).

-- 8< --
Subject: fixup! setup: always honor GIT_WORK_TREE and core.worktree

Remove noisy debug code.

Signed-off-by: Jonathan Nieder <redacted>
---
diff --git b/setup.c a/setup.c
index c0f5846..e08cdf2 100644
--- b/setup.c
+++ a/setup.c
@@ -532,10 +532,8 @@ static const char *setup_git_directory_gently_1(int *nongit_ok)
 	 * validation.
 	 */
 	gitdirenv = getenv(GIT_DIR_ENVIRONMENT);
-	if (gitdirenv) {
-		trace_printf("trace: gitdirenv = %s\n", gitdirenv);
+	if (gitdirenv)
 		return setup_explicit_git_dir(gitdirenv, cwd, len, nongit_ok);
-	}
 
 	ceil_offset = longest_ancestor_length(cwd, env_ceiling_dirs);
 	if (ceil_offset < 0 && has_dos_drive_prefix(cwd))
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help