From: Jacob Abel Date: Fri, 04 Nov 2022 03:58:12 GMT Subject: Re: [PATCH 2/4] builtin/worktree.c: Update checkout_worktree() to use git-worktree Message-ID: <20221104035751.nnrfpvbqlqheb57k@phi> In-Reply-To: <221104.86sfizzeq7.gmgdl@evledraar.gmail.com> On 22/11/04 02:32AM, Ævar Arnfjörð Bjarmason wrote: > > Won't we now start to run the post-checkout when doing this, and is that > intended? It appears it will. `git worktree add` runs the hook manually later after the `done` label so I can suppress the initial hook run in v2. Is there a sanctioned way to do this beyond `-c core.hooksPath=/dev/null`? This seems hacky to put it lightly. Alternatively would `git symbolic-ref HEAD "refs/heads/${new_branch_name}"` work instead (along with reverting the change from reset to checkout) when creating an orphan branch? It appears to work based on my quick tests but there's something I might be missing.