Thread (4 messages) flat view 4 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH] Add missing inside_work_tree setting in setup_git_directory_gently

From: Nguyễn Thái Ngọc Duy <hidden>
Date: 2016-06-15 22:43:46
Subsystem: the rest · Maintainer: Linus Torvalds

Without this, work_tree handling code in setup_git_directory
will be activated. If you stay in root work tree (no prefix),
it does not harm. It does if you work from a subdirectory though.

Signed-off-by: Nguyễn Thái Ngọc Duy <redacted>
---
 Turns out my patch on NEED_WORK_TREE is fixing a wrong place.

 setup.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/setup.c b/setup.c
index 145eca5..6f8f769 100644
--- a/setup.c
+++ b/setup.c
@@ -240,6 +240,7 @@ const char *setup_git_directory_gently(int *nongit_ok)
 			if (chdir(work_tree_env) < 0)
 				die ("Could not chdir to %s", work_tree_env);
 			strcat(buffer, "/");
+			inside_work_tree = 1;
 			return retval;
 		}
 		if (nongit_ok) {
-- 
1.5.3.rc4.3.gab089
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help