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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Sunshine <sunshine@xxxxxxxxxxxxxx> 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.

>
> --- >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?



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux