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 Push Config a Command Rewrites Before the Push in the Write Guard #3046
Found by the local review of the change closing #3019, #3020, #3029, and #3036. Develop's guard shares it, since develop reads neither setting.
A Command Before the Push Can Rewrite the Config the Guard Reads
The guard reads a push's persisted config from the checkout as it stands before the command runs. A command earlier in the same Bash call can change that config first.
git config remote.origin.mirror true && git push --tags origin reads the mirror key as unset, so the push is read as tags only, while git runs it as a mirror push that prunes every branch.
git remote set-url origin https://example.invalid/example/other.git && git push origin develop is judged against the rules of the origin read before the command, while git writes to the other repository.
A bare push in either shape is already unresolved, since git config and git remote mark the branch read unreliable. The gap is a push with no refspec beyond the bare form, and a push with an explicit refspec.
Possible Direction
Where a git config or git remote command runs before a push in the same command, read the push's mirror setting and its checkout's origin as unresolved. A checkout or switch before the push changes neither, so it should not take part.
Activity
Read a Bare Push's Destination From Branch Config, a Persisted Mirror…
Read Commands Hidden in Config, Environment, Aliases, and Other Shell…
Read Config and Alias Rewrites the Write Guard Missed (#3306)
Promote the Write Guard Config and Alias Reads and Smoke Stub Comment…