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

2018-02-16 Thread Eric Sunshine
On Fri, Feb 16, 2018 at 11:55 AM, Lars Schneider wrote: >> On 16 Feb 2018, at 00:09, Eric Sunshine wrote: >> The hook is run manually, rather than via run_hook_le(), since it needs >> to change the working directory to that of the worktree, and

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

2018-02-16 Thread Junio C Hamano
Eric Sunshine writes: > ... > The hook is run manually, rather than via run_hook_le(), since it needs > to change the working directory to that of the worktree, and > run_hook_le() does not provide such functionality. As this is a one-off > case, adding 'run_hook'

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

2018-02-16 Thread Lars Schneider
> On 16 Feb 2018, at 00:09, Eric Sunshine wrote: > > Although "git worktree add" learned to run the 'post-checkout' hook in > ade546be47 (worktree: invoke post-checkout hook, 2017-12-07), it > neglected to change to the directory of the newly-created worktree > before

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

2018-02-15 Thread Eric Sunshine
Although "git worktree add" learned to run the 'post-checkout' hook in ade546be47 (worktree: invoke post-checkout hook, 2017-12-07), it neglected to change to the directory of the newly-created worktree before running the hook. Instead, the hook runs within the directory from which the "git