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 HOME or XDG_CONFIG_HOME Override on a Git Command as an Unread Config File in the Write Guard #3057
Found while closing #2972 and the config environment item of #2943 on feature/guard-hidden-commands-3010. That change treats a GIT_CONFIG_GLOBAL or GIT_CONFIG_SYSTEM file as one the guard does not read, as an include override is.
Gap
HOME and XDG_CONFIG_HOME also decide which global config file git reads, so an assignment to either on a git command points git at a file that may set a command-running key, an alias, or core.hooksPath. Constructed probes against the branch guard, both allowed:
HOME=/example/home git status
XDG_CONFIG_HOME=/example/cfg git fetch origin
Possible Direction
Treat either assignment on a git command as an unread config file, as GIT_CONFIG_GLOBAL is now. Measure the over-denial first, since a HOME override is a common test-isolation shape.
Activity
Read Commands Hidden in Config, Environment, Aliases, and Other Shell…
Read Config and Alias Rewrites the Write Guard Missed (#3306)