Skip to content

fix(git): preserve branch all remote refs#2164

Open
sjh9714 wants to merge 1 commit into
rtk-ai:developfrom
sjh9714:fix/git-branch-all-remotes
Open

fix(git): preserve branch all remote refs#2164
sjh9714 wants to merge 1 commit into
rtk-ai:developfrom
sjh9714:fix/git-branch-all-remotes

Conversation

@sjh9714
Copy link
Copy Markdown

@sjh9714 sjh9714 commented May 30, 2026

Summary

Fixes #2137.

  • Preserve native git branch -a / git branch --all output so explicit all-branch listings keep remote-tracking refs such as remotes/origin/main.
  • Keep the default compact rtk git branch behavior unchanged.
  • Add regression coverage for explicit all output and default compact deduping.

Test plan

  • cargo fmt --all --check
  • cargo test format_branch_output
  • cargo test filter_branch
  • cargo clippy --all-targets
  • cargo test
  • Manual testing: rtk git branch -a output inspected in a temp repo with origin/main and a remote-only branch

Note: I used Codex while preparing this change, and I reviewed the final diff and ran the listed checks locally.

Signed-off-by: jinhyuk9714 <jinhyuk9714@gmail.com>
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 30, 2026

CLA assistant check
All committers have signed the CLA.

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.

[BUG] rtk git branch -a omits remote branches; -r works correctly

2 participants