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 Environment Config Per Git Command, Not by Index Across a Reading, in the Write Guard #3072
_env_config_values in host-setup/agent-safety/claude/gh-write-guard.py pairs GIT_CONFIG_KEY_<n> with GIT_CONFIG_VALUE_<n> by index across every assignment _env_assignments returns for one reading. That covers the prefixes of every git word in the reading at once. A later git command reusing an index overwrites an earlier one's key.
The alias.q pair is replaced by core.pager, so the environment alias on the first command is never read, and the push it runs is not denied by _hidden_command.
Fix
Read the environment config per git word, from that word's own prefix plus the exports before it, rather than once per reading.
Found by a local review pass on the promotion fix for #3064. It is pre-existing on develop.
Activity
Carry Shell Environment, Option Clusters, and Alias Sources Into the …
Read Config and Alias Rewrites the Write Guard Missed (#3306)