Skip to content

[codex] Ensure but-graph keeps exact target segments#13222

Draft
Byron wants to merge 1 commit intogitbutlerapp:masterfrom
Byron:fix-missing-target
Draft

[codex] Ensure but-graph keeps exact target segments#13222
Byron wants to merge 1 commit intogitbutlerapp:masterfrom
Byron:fix-missing-target

Conversation

@Byron
Copy link
Copy Markdown
Collaborator

@Byron Byron commented Apr 8, 2026

Summary

  • ensure but-graph always creates an exact target segment for configured workspace target refs when the graph would otherwise only contain the local tracking segment
  • keep workspace target resolution stable in ambiguous remote/local shapes, including cases where the remote ref itself is absent but the local branch still tracks it
  • update the existing ambiguous-with-remotes snapshots and add a focused regression for the missing target-segment case

Root Cause

but-graph could end up with only a local tracking segment like main <> origin/main and no exact refs/remotes/origin/main segment. The workspace projection expects the configured target ref to exist as its own segment, so target resolution could fail or become shape-dependent after post-processing.

Impact

This normalizes the graph shape for configured workspace targets so downstream workspace logic can rely on the exact target segment existing when possible.

Validation

  • cargo fmt --check --all
  • cargo test -p but-graph

Notes

  • This draft PR was created by Codex.
  • Byron still needs to review the change before it should be merged.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 8, 2026

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

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

but status fails with "No default target branch set" after updating to 0.19.6 and unapplying branches

1 participant