corylus-git / corylus

Git, but a little bit easier
https://corylus.dev
Other
2 stars 0 forks source link

Branch update from context menu fails when checked out as worktree #80

Open DerNamenlose opened 1 year ago

DerNamenlose commented 1 year ago

When a branch is checked out as a worktree it can no longer be updated from the context menu (except from the respective worktree directory). We need to evaluate whether this limitation makes sense and either deactivate the context menu entry or correctly handle the request.

DerNamenlose commented 1 year ago

It's unclear whether an update could even really make sense. Updating only the branch pointer would turn the associated work tree into a detached head. A full update including a checkout would change files outside the current repository's context. Both options are more or less unacceptable. We could either display any changes in the corresponding work tree inline and ask the user whether we should proceed with the update anyway (or just update if there are no changes in said worktree).