Skip to content

Commit 8cfe108

Browse files
committed
pytest_plugin(fix[gitconfig]): Always write config, remove early return
why: The fixture was returning early if .gitconfig already existed, even if the file was empty or missing protocol.file.allow=always. This caused failures on Arch Linux build where git/container setup creates an incomplete .gitconfig before the fixture runs. what: - Remove early return that skipped writing when file exists - Fixture now always writes the full config with protocol.file.allow - Follow-up to #510, #511 for #509
1 parent e3ed829 commit 8cfe108

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

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.5 (2026-01-25)
24+
25+
### Bug Fixes
26+
27+
- pytest plugin: Fix `gitconfig` fixture to always write config (#512)
28+
29+
Follow-up to #510, #511 for #509: The fixture was returning early if
30+
`.gitconfig` already existed (even if empty or incomplete), skipping
31+
the write of `protocol.file.allow=always`. Now always writes the full
32+
config to ensure submodule operations work in strict build environments.
33+
2334
## libvcs 0.38.4 (2026-01-25)
2435

2536
### Tests

src/libvcs/pytest_plugin.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,6 @@ def gitconfig(
154154
"""Return git configuration, pytest fixture."""
155155
gitconfig = user_path / ".gitconfig"
156156

157-
if gitconfig.exists():
158-
return gitconfig
159-
160157
gitconfig.write_text(
161158
textwrap.dedent(
162159
f"""

0 commit comments

Comments
 (0)