Skip to content

[Enhancement] Provide better indication and context-commands for worktree-linked local branch #1761

@goran-w

Description

@goran-w

This behavior confused me a lot and I had to look in the SourceGit code to understand it:

  • I was no longer able to use the 'Fast forward to origin/master' context-command on my local master (tracking) branch.
  • The reason was that I had added (and forgotten) a separate worktree for that branch, while I was working on the develop branch in the original repo-clone (while also having master checked-out there since earlier on).
  • When there's a worktree for a local branch, the mentioned Fast forward context-command is simply hidden from the context-menu.
  • I found this very confusing, and I don't see why I shouldn't be able to fast-forward a local branch EVEN THOUGH there's also a separate worktree for it?
  • Also, there was no visible indication to explain why the context-command was hidden from the menu on that specific branch.

Suggestions:

  • Allow the 'Fast forward to origin/master' context-command on local branches regardless of worktree associations, since it should be a harmless command to use in any case.
  • Also, add an extra context-command rename Checkout to 'Switch to linked worktree' on local branches that are checked out in linked worktrees.
  • Finally, add some visual indication, or at the very least an indication in the tooltip on such a branch, that it is "special" by being checked out in a linked worktree.

BONUS-feature: Add more explicit ahead/behind-indicators in the tooltip for local branches, to help us remember which of the up/down arrows means which direction. 😉

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions