Skip to content

overhaul push_stack api#13652

Closed
krlvi wants to merge 3 commits intomasterfrom
kv-branch-118
Closed

overhaul push_stack api#13652
krlvi wants to merge 3 commits intomasterfrom
kv-branch-118

Conversation

@krlvi
Copy link
Copy Markdown
Member

@krlvi krlvi commented May 6, 2026

Making it gitbutler-branch-actions free and single branch mode compatible

Copilot AI review requested due to automatic review settings May 6, 2026 07:20
@github-actions github-actions Bot added the rust Pull requests that update Rust code label May 6, 2026
@krlvi krlvi force-pushed the kv-branch-118 branch from e7e49c2 to aca2992 Compare May 6, 2026 07:21
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_stack implementation (and its Gerrit/hook/integration logic) from gitbutler-branch-actions.
  • Introduced but-workspace::legacy::push to build a workspace-derived push plan (PushStackPlan) and target (PushTarget).
  • Reimplemented but-api’s push_stack using PushTarget + PushStackPlan and 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.

Comment thread crates/but-api/src/legacy/stack.rs
Comment thread crates/but-workspace/src/legacy/push.rs Outdated
Comment thread crates/but-workspace/src/legacy/push.rs
Copy link
Copy Markdown
Contributor

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread crates/but-workspace/src/legacy/push.rs
@krlvi krlvi force-pushed the kv-branch-118 branch from aca2992 to 855dd75 Compare May 6, 2026 07:39
Copilot AI review requested due to automatic review settings May 6, 2026 10:46
@krlvi krlvi force-pushed the kv-branch-118 branch from 855dd75 to 2c2c4ec Compare May 6, 2026 10:46
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated no new comments.

@krlvi krlvi force-pushed the kv-branch-118 branch from 2c2c4ec to 826b8c6 Compare May 6, 2026 12:43
Copilot AI review requested due to automatic review settings May 6, 2026 13:34
@krlvi krlvi force-pushed the kv-branch-118 branch from 826b8c6 to d9c505f Compare May 6, 2026 13:34
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.

Comment thread crates/but-workspace/src/legacy/push.rs
Comment thread crates/but-api/src/legacy/stack.rs
@krlvi krlvi closed this May 6, 2026
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.

2 participants