Skip to content

fix(cli): make but branch show treat branches as buckets - #16417

Open
davidpdrsn wants to merge 1 commit into
david/gb-2146-support-creating-the-first-commit-with-but-commitfrom
david/gb-2122-but-show-branch-shows-commits-on-descendant-branches
Open

davidpdrsn wants to merge 1 commit into
david/gb-2146-support-creating-the-first-commit-with-but-commitfrom
david/gb-2122-but-show-branch-shows-commits-on-descendant-branches

Conversation

@davidpdrsn

Copy link
Copy Markdown
Contributor

No description provided.

@linear-code

linear-code Bot commented Oct 20, 2026

Copy link
Copy Markdown

GB-2122

@davidpdrsn
davidpdrsn added this pull request to stack #16411 October 20, 2026 13:28
@davidpdrsn
davidpdrsn marked this pull request as ready for review October 20, 2026 13:28
Copilot AI balanced review requested due to automatic review settings October 20, 2026 13:28
@github-actions github-actions Bot added rust Pull requests that update Rust code CLI The command-line program `but` labels Oct 20, 2026
@davidpdrsn
davidpdrsn force-pushed the david/gb-2122-but-show-branch-shows-commits-on-descendant-branches branch from 3e59c48 to f8faf12 Compare October 20, 2026 13:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Merge histories still include commits outside the selected bucket, and missing bases can cause JSON output failures.

2 open issues
What changed in this PR

Updates CLI branch inspection to treat workspace branches as commit buckets rather than full histories back to the target.

Changes:

  • Uses bucket bases in both show commands.
  • Corrects dependency ordering and commit counts.
  • Adds selected-branch, JSON, and empty-bucket tests.
File Description
crates/​but/​tests/​but/​command/​branch/​show.rs Adds bucket-scoped output coverage.
crates/​but/​src/​command/​legacy/​show.rs Uses bucket bases and corrects dependency reporting.
crates/​but/​src/​command/​legacy/​branch/​show.rs Uses workspace bucket bases when listing commits.

Review effort: Balanced

Comment thread crates/but/src/command/legacy/show.rs
Comment thread crates/but/src/command/legacy/show.rs
Copilot AI balanced review requested due to automatic review settings October 20, 2026 13:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Merge-parent traversal still includes commits outside the selected workspace bucket.

3 open issues

Review effort: Balanced

Comment thread crates/but/src/command/legacy/branch/show.rs
Copilot AI balanced review requested due to automatic review settings October 20, 2026 13:56
@davidpdrsn
davidpdrsn force-pushed the david/gb-2122-but-show-branch-shows-commits-on-descendant-branches branch from f8faf12 to 65c4356 Compare October 20, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔵 Needs a closer look

Merge-parent traversal and branches without a base need further validation before approval.

No open issues 🎉

3 resolved since last review

Review effort: Balanced

This branch has not been deployed

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

Labels

CLI The command-line program `but` rust Pull requests that update Rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants