integration: short-circuit gs branch checkout for the integration#1256
Open
ed-irl wants to merge 2 commits into
Open
integration: short-circuit gs branch checkout for the integration#1256ed-irl wants to merge 2 commits into
ed-irl wants to merge 2 commits into
Conversation
This was referenced Jun 12, 2026
Collaborator
Author
This was referenced Jun 12, 2026
Open
28adf10 to
41432f4
Compare
7dbd7a4 to
a28072b
Compare
41432f4 to
2b66da9
Compare
a28072b to
781c846
Compare
'gs bco <integration>' previously fell into the generic "branch not tracked" path: in interactive mode the user was prompted to track the branch (and accepting would then fail with "cannot track integration branch"), and in non-interactive mode they got a misleading warning to run 'gs branch track'. Both are noise — the integration is deliberately untracked and the user typed its name because they want to switch to it. Detect the integration branch in the branchCheckoutCmd up front. If the requested name matches, emit a single targeted warning that the branch is throwaway and short-circuit ShouldTrack to return false so the existing CheckoutBranch path falls through to the plain checkout without prompting. This makes 'gs bco <integration>' a viable alias for 'gs intco' without introducing a separate command path or changing the checkout handler's contract.
241a02f to
157630c
Compare
81ff834 to
6237432
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
'gs bco ' previously fell into the generic "branch not
tracked" path: in interactive mode the user was prompted to track the
branch (and accepting would then fail with "cannot track integration
branch"), and in non-interactive mode they got a misleading warning
to run 'gs branch track'. Both are noise — the integration is
deliberately untracked and the user typed its name because they want
to switch to it.
Detect the integration branch in the branchCheckoutCmd up front. If
the requested name matches, emit a single targeted warning that the
branch is throwaway and short-circuit ShouldTrack to return false so
the existing CheckoutBranch path falls through to the plain checkout
without prompting.
This makes 'gs bco ' a viable alias for 'gs intco'
without introducing a separate command path or changing the checkout
handler's contract.