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
Read a Drive-Letter Push Target as Local Only on Windows in the Write Guard #3317
The write guard reads a push target that starts with a drive letter and a colon, such as C:x/y, as a local path on every platform. That is how Git for Windows reads it. Git on Linux and macOS checks the drive prefix only on Windows. So on those hosts g:example/beta is an ssh URL to the host alias g, naming the repository example/beta.
The guard reads such a push's target repository as undetermined. For main, master, and develop that denies, which is safe. For any other branch, undetermined rules allow the push. So the target repository's own ruleset is not read there, for example a release/* rule on a non-origin remote reached through a one-letter ssh host alias.
Found by the local review on the pull request closing #3048. Per that lane's rule, a change to a denial the lane added is filed rather than narrowed in the same pull request. Gating the match would narrow the protected-default denial on Linux while it widens the non-default read.
Reproduction (constructed repository, Linux)
A checkout whose origin's release/1 has no rule, with a remote repository example/beta whose release/1 requires a pull request.
Classify git push g:example/beta release/1 there.
The guard allows it. Git pushes over ssh to host g, writing release/1 in example/beta.
Possible Direction
Gate the drive-letter match on Windows, as _MSYS_DRIVE_PATHS already gates the drive spelling. Then a one-letter ssh host on Linux resolves to the repository it names.
Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.
Activity
Judge a Push Against the Repository and Branches It Actually Writes (#…
ptr727 commentedon Oct 23, 2026
Closed as out of the write guard's scope under the maintainer's decision (ptr727, 2026-10-23) on #3391, item 1. The guard bounds a good-faith agent's mistake rather than an adversary, so a parse gap reached only by a command shape no agent plausibly types in a coding session is closed rather than fixed, and the guard's own growth is a cost each later review pays again. The scope statement lands in the guard's docstring and README under #3391. Reopen only with a command a session actually produced.