You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(submit): Validate fetch refspecs and fix upstream tracking (#963)
Fixes a panic when updating CRs without upstream tracking
and prevents branches from being left in an untrackable state.
When git is configured with minimal fetch refspecs
(e.g., only fetching main),
pushing a new branch would succeed,
but the branch could not be fetched back locally.
This left the branch without upstream tracking,
causing a panic on subsequent submit attempts.
This change adds validation before pushing
to ensure the remote's fetch refspecs will actually fetch
the pushed branch.
If not, it provides clear error messages
with options to fix the configuration.
Additionally, replaces the panic when updating CRs
without upstream tracking
with a helpful error message
guiding users to set the upstream manually.
LLM assistance:
An LLM was used to reproduce the original panic,
to identify in Git source code where refspec matching is implemented,
to transform that logic into Go code, and to draft the original commit
message.
Fixes#962
Co-authored-by: Claude <noreply@anthropic.com>
body: 'branch submit: Check if git configuration prevents pushed branches from being tracked, which could leave branches in a state where follow-up submits are not possible'
0 commit comments