-
Notifications
You must be signed in to change notification settings - Fork 12
New worktree interface behaves erratically for primary repo/worktree #2746
Description
using fork win 2.18.0.0
I have the following worktree setup:
I'm not sure if this occurs all the time for any repo where you've added a worktree, or only if you had previously manually created a worktree specifically for the main tracking branch (which I had done, using the previous iterations of Fork), but once you have more than one, windows fork seems to start behaving inconsistently when dealing with the main branch / top level worktree.
If you are in a separate linked worktree, you cannot (create a new tab for it if needed, and then) switch to the main branch worktree by double clicking the main branch (like you can for any other worktree), it brings up this error.
Right clicking a branch associated with a linked worktree brings up the option to switch to it, like so:
But right clicking the main branch does not give you that option, even though it is also associated with a worktree:
In fact, the only way you can now actually switch back to the master branch as far as I can tell is to right click on the worktree associated with it in the worktree section of the side bar and click to open it there:
--
Another inconsistency is whether the main branch worktree is even shown in the worktree section. When you are in another worktree it appears there (and shows as a higher level "folder" object for the other linked worktrees), as in the screenshot above. However, once you have actually opened that main branch worktree, it no longer displays itself in the worktree listing:
Additionally, the tab opened for the main worktree just shows the main repo name, as it would if no worktrees had been created, and unlike what it shows for any linked worktree (which show as repo name: worktree name).
It is worth noting, in case it is relevant, that all my worktrees are physically located at the same folder level in the filesystem as the main repo. I had started that convention before the most recent update, which now seems to default to placing them in a worktrees subdirectory. Fork didn't seem to have any problem continuing to create them in this way, but I thought I would mention it in case it were somehow relevant to the behavior seen above.