Skip to content

Commit 6529ed6

Browse files
authored
pytest_plugin: Add GIT_CONFIG_GLOBAL for child processes (#513)
## Summary - Adds `GIT_CONFIG_GLOBAL` to `set_gitconfig` fixture - When git spawns child processes (e.g., `git submodule add`), `GIT_CONFIG` is explicitly excluded from the child environment - `GIT_CONFIG_GLOBAL` IS inherited by child processes, fixing submodule operations in strict build environments Follow-up to #512 / v0.38.5 for #509
2 parents 7f1b465 + 53fcaf6 commit 6529ed6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGES

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ $ uv add libvcs --prerelease allow
2020
_Notes on the upcoming release will go here._
2121
<!-- END PLACEHOLDER - ADD NEW CHANGELOG ENTRIES BELOW THIS LINE -->
2222

23+
## libvcs 0.38.6 (unreleased)
24+
25+
### Bug Fixes
26+
27+
- pytest plugin: Add `GIT_CONFIG_GLOBAL` to `set_gitconfig` fixture (#512)
28+
29+
Follow-up to v0.38.5 for #509: When git spawns child processes (e.g.,
30+
during `git submodule add`), it explicitly excludes `GIT_CONFIG` from
31+
the child environment. `GIT_CONFIG_GLOBAL` is the proper way to override
32+
global config location as it IS inherited by child processes.
33+
2334
## libvcs 0.38.5 (2026-01-25)
2435

2536
### Bug Fixes

src/libvcs/pytest_plugin.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ def set_gitconfig(
180180
) -> pathlib.Path:
181181
"""Set git configuration."""
182182
monkeypatch.setenv("GIT_CONFIG", str(gitconfig))
183+
monkeypatch.setenv("GIT_CONFIG_GLOBAL", str(gitconfig)) # For child processes
183184
return gitconfig
184185

185186

0 commit comments

Comments
 (0)