From: Gabriel Scherer Date: Wed, 17 Sep 2025 15:25:54 GMT Subject: Re: [PATCH 1/3] checkout: provide hint when failing due to another worktree Message-ID: In-Reply-To: <0dfe3e31-5486-446e-8af5-20669c06ea64@inria.fr> Dear git developers, On 15/09/2025 21:52, Gabriel Scherer wrote: > (This gets me to wonder if a desirable behavior could be to 'detach' the other worktrees that had the same branch checked out, instead of failing on checkout. Users starting to use the other worktree again would possibly notice more quickly that something is amiss.) After the new feedback from Junio, I wonder if I should explore this suggestion more actively. For now my goal has been to make --ignore-other-worktrees more discoverable, for people who are willing to take the risk. (I am comfortable doing this as I have used this workflow for years without much trouble with the 'workdir' script, but clearly you want to be very careful in how exactly we suggest that it is a possibility.) Would you prefer a different option to detach the branch at the other worktrees? This could be git checkout --detach-other-worktrees for example. I did not originally consider this as it requires more expertise in git internal data structures, but it may be easier than finding a way to advertise --ignore-other-worktrees that you are really comfortable with.