Skip to content

graph -> stacks: conformity #9209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jul 8, 2025
Merged

Conversation

Byron
Copy link
Collaborator

@Byron Byron commented Jun 30, 2025

Bring the new Graph based backend for workspaces to conformity with the existing implementation - it shouldn't be worse, but ideally can be the daily driver for ws3 users.

Tasks

  • remaining fixes
    • test commit-ownership for 'virtual' branches and remote-ref special case
      • Fixed underlying commit classification, without actually special casing this.
    • ref_info2 workspace should never be ignored (i.e. find workspace, but set entrypoint, or start at workspace and extract what's needed)
    • respect stack order
    • integrated dependent base branch should still show up
      • in-workspaces with all-integrated by identity (remote merged) stay visible (integrated_tips_stop_early)
        • assure sibling-id is set for target local tracking as well then
      • add reasonable base as first reachable integrated commit (simplified), maybe the merge-base between all workspace branches?
  • add 'insert multi-segments above' capability for more natural reconciled graphs
    • Avoid remote segments inside the workspace, prefer to put them on top.
  • split across stacks (those that are resting at the target ref (or maybe the merge base?))
    • We must be able to split out stacks of empty commits resting at the base, that is segments that will be mapped into stacks later. For that we connect them to the governing workspace.
    • This is also related to having a single commit with lots of refs on top, they all need to be split into stacks.
  • 'archived' out-of-workspace refs are forcefully added (and marked) accordingly - archived segments can still be used for reconcilation if they are reachable, it's really about the frontend having this data even after a workspace update
  • in-workspace segments with all-integrated-by-similarity (remote rebased + merged) stay visible (two_dependent_branches_first_rebased_and_merged_into_target)
  • Validate that using the local tracking branch of target to compute the merge-base is the right choice
  • ⚠️ fix related TODOs and known issues
  • ⚠️assure parent-order is correct during traversal (must match parents in merge commits)
  • delete now unused code

Not to forget

  • There might be an issue with the way it uses searches - a tip with a search might be blocked at an existing commit, discovered by a tip with a different search, and even though the thing it searches is reachable through that, it stops looking.
  • ⚠️ the amount of commits of remotes ahead of their local branch doesn't seem to always match git (particularly when it's a lot of them)
  • ⚠️handle the archived flag
  • ⚠️ current implementation supports multiple workspaces in theory, but it's not tested with them as the underlying ref-metadata is still VB-toml. So before supporting this, we probably already want to have migrated away from vb.toml, to then port the ref-metadata to something that can support more workspaces (also for testing).
  • ⚠️ we probably don't correctly handle workspaces that include other workspaces.
  • ⚠️ we probably don't handle dot-repositories correctly, by merit of not really having them in mind. At least they shouldn't be in the way of handling normal remotes.

Related

Previous

Copy link

vercel bot commented Jun 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-components ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 8, 2025 6:10pm

Copy link

vercel bot commented Jun 30, 2025

@Byron is attempting to deploy a commit to the GitButler Team on Vercel.

A member of the Team first needs to authorize it.

@Byron Byron force-pushed the graph-segmentation branch from 6c17155 to ce052a6 Compare June 30, 2025 11:16
@github-actions github-actions bot added the rust Pull requests that update Rust code label Jun 30, 2025
@Byron Byron force-pushed the graph-segmentation branch from ce052a6 to 3c8c05b Compare June 30, 2025 14:47
@Byron Byron force-pushed the graph-segmentation branch from 3c8c05b to d840bb8 Compare June 30, 2025 15:28
@Byron Byron force-pushed the graph-segmentation branch from d840bb8 to fd3c8db Compare June 30, 2025 18:48
@Byron Byron force-pushed the graph-segmentation branch from fd3c8db to 1532bee Compare July 1, 2025 05:14
@Byron Byron force-pushed the graph-segmentation branch from 1532bee to 7d06dea Compare July 1, 2025 11:41
@Byron Byron force-pushed the graph-segmentation branch from 7d06dea to 58b46a9 Compare July 1, 2025 13:49
@Byron Byron force-pushed the graph-segmentation branch from 58b46a9 to ce2655e Compare July 2, 2025 02:31
@Byron Byron force-pushed the graph-segmentation branch from ce2655e to afc2b84 Compare July 2, 2025 18:07
@Byron Byron force-pushed the graph-segmentation branch from afc2b84 to 88a904e Compare July 3, 2025 06:49
@Byron Byron force-pushed the graph-segmentation branch from 88a904e to 4026d3d Compare July 3, 2025 10:50
@Byron Byron force-pushed the graph-segmentation branch from 4026d3d to 80aee73 Compare July 4, 2025 12:39
@Byron Byron force-pushed the graph-segmentation branch from 80aee73 to fb8a442 Compare July 7, 2025 09:09
Byron added 4 commits July 7, 2025 11:28
That way searches through all nodes can be avoided just to find a segment
with a spsecific ref-name.
Later this will allow assuring the the local tracking branch of the target ref
will always be connected with the workspace graph, which should in turn assure
we can show the integrated (but still visible from forkpoint) segments correctly.
@Byron Byron force-pushed the graph-segmentation branch from 715de1a to 740b0cf Compare July 8, 2025 18:09
@Byron Byron marked this pull request as ready for review July 8, 2025 18:11
@Byron Byron enabled auto-merge July 8, 2025 18:11
@Byron Byron merged commit 506cb98 into gitbutlerapp:master Jul 8, 2025
19 of 20 checks passed
@Byron Byron deleted the graph-segmentation branch July 8, 2025 18:15
@Byron Byron mentioned this pull request Jul 8, 2025
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant