Thread (1 message) 1 message, 1 author, 2018-02-15

Re: [PATCH v2] worktree: add: fix 'post-checkout' not knowing new worktree location

From: Junio C Hamano <hidden>
Date: 2018-02-15 21:36:27

Eric Sunshine [off-list ref] writes:
I'm a dummy. Can you squash in the following and retry?
I haven't tried, but that does look like the right thing to do,
whether it is the root cause of the fault I am seeing.

Thanks.
quoted hunk
--- >8 ---
diff --git a/builtin/worktree.c b/builtin/worktree.c
index 604a0292b0..f69f862947 100644
--- a/builtin/worktree.c
+++ b/builtin/worktree.c
@@ -348,7 +348,7 @@ static int add_worktree(const char *path, const char *refname,
 	if (!ret && opts->checkout) {
 		const char *hook = find_hook("post-checkout");
 		if (hook) {
-			const char *env[] = { "GIT_DIR", "GIT_WORK_TREE" };
+			const char *env[] = { "GIT_DIR", "GIT_WORK_TREE", NULL };
 			cp.git_cmd = 0;
 			cp.no_stdin = 1;
 			cp.stdout_to_stderr = 1;
--- >8 ---
If that fixes it, can you squash it locally or should I re-send?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help