Conversation
There was a problem hiding this comment.
Pull request overview
This PR relocates the legacy “push stack” functionality out of gitbutler-branch-actions into the but-api/but-workspace layer, aiming to remove the gitbutler-branch-actions dependency and support single-branch mode by deriving push inputs from persisted default-target metadata.
Changes:
- Removed the legacy
push_stackimplementation (and its Gerrit/hook/integration logic) fromgitbutler-branch-actions. - Introduced
but-workspace::legacy::pushto build a workspace-derived push plan (PushStackPlan) and target (PushTarget). - Reimplemented
but-api’spush_stackusingPushTarget+PushStackPlanand a local executor; also made integrated-commit detection deterministic by sorting upstream commit IDs.
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/gitbutler-branch-actions/src/stack.rs | Removes push_stack implementation, leaving stack mutation helpers (create/update) only. |
| crates/gitbutler-branch-actions/src/lib.rs | Stops compiling/exporting the legacy virtual module from this crate. |
| crates/gitbutler-branch-actions/Cargo.toml | Drops but-gerrit dependency now that pushing logic is removed. |
| crates/but-workspace/src/legacy/push.rs | Adds new push-planning types (PushTarget, PushStackPlan) and workspace-derived branch filtering logic. |
| crates/but-workspace/src/legacy/mod.rs | Exposes the new legacy::push module publicly. |
| crates/but-workspace/src/legacy/integrated.rs | Sorts upstream commit IDs to ensure binary_search-based integrated checks are correct/deterministic. |
| crates/but-api/src/legacy/stack.rs | Replaces the old call into gitbutler-branch-actions::stack::push_stack with plan+executor-based pushing. |
| Cargo.lock | Removes but-gerrit from the gitbutler-branch-actions dependency set. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7e49c2646
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Making it gitbutler-branch-actions free and single branch mode compatible