breaking(but): remove but branch show in favor of but show#13518
breaking(but): remove but branch show in favor of but show#13518
but branch show in favor of but show#13518Conversation
b459548 to
88787d6
Compare
There was a problem hiding this comment.
Pull request overview
This PR removes the legacy but branch show implementation and routes users to the newer but show command, keeping a hidden deprecated branch show subcommand that errors with guidance to preserve CLI compatibility.
Changes:
- Replace
but branch showexecution with an explicit error directing users tobut show. - Remove the legacy
branch showimplementation code and associated tests. - Update CLI metrics naming to stop emitting a distinct
BranchShowcommand metric.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/but/src/lib.rs | Makes but branch show fail with a deprecation/removal message pointing to but show. |
| crates/but/src/args/branch.rs | Keeps a hidden branch show subcommand that accepts any trailing args for compatibility. |
| crates/but/src/args/metrics.rs | Removes the BranchShow metric command name variant. |
| crates/but/src/utils/metrics.rs | Maps branch show invocations to BranchList for metrics emission. |
| crates/but/src/command/legacy/branch/mod.rs | Removes the legacy show_branches entrypoint and module wiring. |
| crates/but/src/command/legacy/branch/show.rs | Deletes the legacy implementation of but branch show. |
| crates/but/tests/but/command/branch/mod.rs | Stops compiling the removed branch show test module. |
| crates/but/tests/but/command/branch/show.rs | Deletes tests that validated the old but branch show behavior. |
They are almost identical in functionality, but `but branch show` has three features that `but show` does not have: 1. The ability to fetch review information 2. The ability to check integration status 3. The ability to show branches not in the workspace Point 3 is more of a bug in `but show` than a missing feature, it just shows an empty branch for any branch that is not applied. That will be fixed, and if there is any kind of demand we can reimplement review and merge checking.
d42e426 to
b436993
Compare
| @@ -1,5 +1,4 @@ | |||
| mod apply; | |||
| mod list; | |||
| mod new; | |||
There was a problem hiding this comment.
Removing the branch/show.rs test module drops the only CLI coverage for the “show commits ahead for a branch” JSON behavior. Since but branch show is being replaced by but show, consider porting these tests to exercise but show <branch> (and --verbose if that’s the equivalent of the old --files) so the user-visible behavior remains covered.
| mod new; | |
| mod new; | |
| mod show; |
There was a problem hiding this comment.
This is actually a good find that might be relevant. The JSON output from but show does not contain commits_ahead. It's trivial to compute with e.g. but --json show <id> | jq '.commits | length', but still it's probably convenient to have there.
The JSON output of but show is also more verbose than but branch show in that it contains commit details (e.g. files) by default. Perhaps that will have a negative impact on agents. Some more consideration is necessary before making this switch.
They are almost identical in functionality, but
but branch showhas three features thatbut showdoes not have:Point 3 is more of a bug in
but showthan a missing feature, it just shows an empty branch for any branch that is not applied. That will be fixed, and if there is any kind of demand we can reimplement review and merge checking.This PR leaves a skeleton implementation of
but branch showthat simply tells the user to usebut showinstead.