Fix worktree→local branch switch causing 'already used by worktree' error

When in a secondary worktree and selecting a branch checked out in the
main worktree (e.g. main), the code skipped the worktree redirect
(because worktreePath === project.cwd) and tried git checkout, which
git rejected.

Now any branch with a worktreePath is handled as a redirect — main
worktree redirects to local (worktreePath=null), secondary worktrees
redirect to their path.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
d6ecf15805Julius Marminge committed on 2/11/2026, 11:36:11 PMparent5b7af7b
1 file changedLine totals unavailable