-
Notifications
You must be signed in to change notification settings - Fork 828
Open
Labels
enhancementAn improvement to an existing featureAn improvement to an existing feature
Description
Background
GitButler currently operates on branches that are transparently integrated in an local-only octopus merge commit.
* <- origin/main
| m <- gitbutler/workspace
| / \
| a2 | <- feature-a
| | b2 <- feature-b
| a1 |
|/ b1
* /
| __/
*
In the above schematic, m is an app-managed merge commit not displayed in the app, referenced as gitbutler/workspace. Branches feature-a and feature-b are independently merge-able (i.e. not stacked) and thus can be pushed to the remote independently.
This setup facilitates the support of having multiple independent, non-stacked branches checked out at the same time.
A current limitation in GitButler is that this the merge commit m and the gitbutler/workspace branch are setup even when no multitasking is required.
* <- origin/main
| m <- gitbutler/workspace
| |
| a <- feature-a
| |
| a
|/
*
Objectives
- Support a "single branch" mode (no workspace branch, no integration merge commit)
- Switch into a workspace when it is requested from the app to apply a second concurrent branch
- Switch out of a workspace when removing a branch from the workspace leaves it with just a single branch
Sub-tasks
Foundations
- Graph based internal representation of branches that can handle the absence of the workspace merge commit (implemented in https://github.com/gitbutlerapp/gitbutler/blob/master/crates/but-graph/src/lib.rs)
- Updated commit engine that can handle the absence of the workspace merge commit (implemented in https://github.com/gitbutlerapp/gitbutler/blob/master/crates/but-workspace/src/commit_engine/mod.rs)
- New rebase engine operating on the new graph based internal data model (implemented in https://github.com/gitbutlerapp/gitbutler/blob/master/crates/but-rebase/src/lib.rs)
APIs to overhaul
- "apply to workspace" to support the absence of a workspace (implemented in https://github.com/gitbutlerapp/gitbutler/blob/master/crates/but-workspace/src/branch/apply.rs#L158-L180)
- "unapply from workspace" to support removing of the workspace (switching to single branch mode)
- "update workspace" to support updating multiple or a single branch
- "insert blank commit"
- "move changes between commits"
- "reword a commit"
- "remove changes from commit"
- "reorder a commit"
- "uncommit"
- "squash commits"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementAn improvement to an existing featureAn improvement to an existing feature