[codex] Ignore fsmonitor config in Git metadata reads (#22652)

## Summary
- keep Git metadata/status subprocesses independent of repository
`core.fsmonitor` configuration
- preserve existing working-tree state reporting while making the helper
behavior more predictable
- add regression coverage for `get_has_changes` when a repository
defines an fsmonitor command

## Validation
- `cargo fmt --all`
- `cargo test -p codex-core test_get_has_changes_`
- `cargo test -p codex-git-utils`
This commit is contained in:
Chris Bookholt
2026-05-14 10:07:43 -07:00
committed by GitHub
Unverified
parent 8736e32657
commit 6ec8c4a6ec
2 changed files with 43 additions and 0 deletions
+1
View File
@@ -375,6 +375,7 @@ async fn run_git_command_with_timeout(args: &[&str], cwd: &Path) -> Option<std::
let mut command = Command::new("git");
command
.env("GIT_OPTIONAL_LOCKS", "0")
.args(["-c", "core.fsmonitor=false"])
.args(args)
.current_dir(cwd)
.kill_on_drop(true);