Skip to content

Add remote branches to git switch completion#224

Merged
lucieleblanc merged 3 commits into
mainfrom
app-3485/command-spec-git-switch
Apr 3, 2026
Merged

Add remote branches to git switch completion#224
lucieleblanc merged 3 commits into
mainfrom
app-3485/command-spec-git-switch

Conversation

@lucieleblanc
Copy link
Copy Markdown
Contributor

@lucieleblanc lucieleblanc commented Apr 1, 2026

Summary

Add remote branches to git switch completions. Previously, only local branches were suggested when typing git switch <tab>. Now, remote branch names (without the remote prefix) are also suggested, matching git switch's default --guess behavior which creates a local tracking branch from a uniquely-named remote branch.

Changes

  • Updated the git switch subcommand's first positional arg in git.json to use both local_branches and refs_remote_branches generators (previously only local_branches).

Screenshot

git switch now shows remote branches (bugfix-remote-gamma, feature-remote-alpha, feature-remote-beta) alongside local branches:

git switch completions showing remote branches

Testing

  • All presubmit checks pass (formatting, clippy, tests)
  • Verified end-to-end in a local Warp build against a test repo with remote-only branches

Fixes APP-3485.


Conversation: https://staging.warp.dev/conversation/21d356e2-2c44-4756-afd2-498c2abb3a37
Run: https://oz.staging.warp.dev/runs/019d4b03-75ea-74ee-b255-25b8c3efd97c

This PR was generated with Oz.

Wire the refs_remote_branches generator into the git switch subcommand's
first positional arg so remote branch names are suggested alongside local
branches. This matches git switch's default --guess behavior, which
creates a local tracking branch from a uniquely-named remote branch.

Fixes APP-3485.

Co-Authored-By: Oz <oz-agent@warp.dev>
@linear
Copy link
Copy Markdown

linear Bot commented Apr 1, 2026

APP-3485 [git] Add remote branches to git switch completion

Add remote branches to git switch completion. Currently only local branches are suggested. The refs_remote_branches generator exists but may not be wired into the switch subcommand's args in git.json.

See GitHub #1980, #4140

Co-Authored-By: Oz <oz-agent@warp.dev>
@lucieleblanc
Copy link
Copy Markdown
Contributor Author

Screenshot:
image

@lucieleblanc lucieleblanc marked this pull request as ready for review April 3, 2026 15:41
@lucieleblanc lucieleblanc merged commit 9cc88c4 into main Apr 3, 2026
3 checks passed
@lucieleblanc lucieleblanc deleted the app-3485/command-spec-git-switch branch April 3, 2026 16:20
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.

2 participants