Re: [PATCH v2] worktree: add: fix 'post-checkout' not knowing new worktree location
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Feb 15, 2018, 23:09 UTC
- Message-ID
- <CAPig+cTjGygRjy8Yagdd=U=5j7PqHqunbYVvm0dkq23QjLOaOQ@mail.gmail.com>
- In-Reply-To
- <20180215212751.GA42108@flurp.local>
On Thu, Feb 15, 2018 at 4:27 PM, Eric Sunshine <sunshine@sunshineco.com> wrote:
Show 11 quoted lines
> On Thu, Feb 15, 2018 at 12:52:11PM -0800, Junio C Hamano wrote:
>> This seems to segfault on me, without leaving hook.actual anywhere.
>
> I'm unable to reproduce the segfault, but I'm guessing it's because
> I'm a dummy. Can you squash in the following and retry?
>
> diff --git a/builtin/worktree.c b/builtin/worktree.c
> - const char *env[] = { "GIT_DIR", "GIT_WORK_TREE" };
> + const char *env[] = { "GIT_DIR", "GIT_WORK_TREE", NULL };
>
> If that fixes it, can you squash it locally or should I re-send?Okay, I was able to reproduce the crash on FreeBSD (but not MacOS or Linux), and the above change does indeed fix it. I'll send v3 in a moment to address it.