forked from vhaudiquet/rhema-claw
The provisioning resolved its target itself: GIT_CONFIG_GLOBAL when set, `.gitconfig` in the home otherwise. That guess is wrong on half the machines git runs on — git's global scope spans both `.gitconfig` and the XDG `~/.config/git/config`, and when the user's identity lives in the XDG file, writing `.gitconfig` shadows it: the daemon's values win silently over the user's, and the guard — which read only the file it was about to write — never saw the existing identity it was built to respect. On this machine the daemon then booted once during testing and the next commit was authored claw <claw@k6>, and pushed. The scope is git's now. Reads and writes run through `git config --global`, so the guard sees whatever a commit would actually carry, from whichever file holds it; writes land in the file git itself picks — the established XDG config when that is the one, `.gitconfig` otherwise. A scope given explicitly pins `GIT_CONFIG_GLOBAL` on the child process only, which keeps the tests isolated without touching the caller's environment. Verified on the machine that was bitten: booting the daemon bare now resolves the defaults and then keeps the user's identity — no file written, the XDG values untouched.