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
{{ message }}
Repository navigation
Skip the Source-Only Refspec Mapping for a Delete Push in the Write Guard #3314
The write guard's source-only refspec mapping (added for #3048 and #2943's persisted push config item) reads a --delete push's refspecs as if git mapped them. Git does not: it turns each --delete word into :<name> before any remote.<name>.push or push.default=upstream mapping is reached, so only the named branch is deleted.
The guard therefore reads a routine branch cleanup as deleting the branch the mapping names. This is an over-denial, found by the local review on the pull request closing #3048, and per that lane's rule it is filed rather than narrowed in the same pull request.
Reproduction (constructed repository)
A checkout whose origin's develop carries a deletion or pull_request rule.
git config push.default upstream, on a branch feature/example whose branch.feature/example.merge is refs/heads/develop (the shape git worktree add -b feature/example <path> origin/develop leaves).
Classify git push origin --delete feature/example in that checkout.
The guard denies it as a write to develop. A real push there deletes only feature/example. A remote.origin.push of refs/heads/feature/example:refs/heads/develop gives the same denial.
Possible Direction
Skip the source-only mapping for a push carrying --delete (or -d, in any spelling _push_targets already reads as a delete), since git never maps it.
Closed as resolved by the write guard rewrite (#3407, on main through promotion #3417). The command shape this issue records is one of the source-tagged cases in the rewritten guard's self-test corpus, so the shape is read the way the issue asks, and the corpus case is what keeps it so. Reopen with the command if a session still hits it.
Activity
Judge a Push Against the Repository and Branches It Actually Writes (#…
Rewrite the Write Guard as a Small Lexer With Plain-Shape Rules (#3407)
ptr727 commentedon Oct 24, 2026
Closed as resolved by the write guard rewrite (#3407, on main through promotion #3417). The command shape this issue records is one of the source-tagged cases in the rewritten guard's self-test corpus, so the shape is read the way the issue asks, and the corpus case is what keeps it so. Reopen with the command if a session still hits it.