Fix gitconfig fixture to always write config (Take 4 for #509)#512
Merged
Fix gitconfig fixture to always write config (Take 4 for #509)#512
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #512 +/- ##
==========================================
+ Coverage 53.46% 53.48% +0.01%
==========================================
Files 38 38
Lines 5705 5703 -2
Branches 1063 1062 -1
==========================================
Hits 3050 3050
+ Misses 2144 2143 -1
+ Partials 511 510 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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
8cfe108 to
522e3c4
Compare
3 tasks
tony
added a commit
that referenced
this pull request
Jan 27, 2026
## 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitconfigfixture to always write config - removes early return that skipped writing when file existsfile://protocol in test fixture #510, Fixgit_repofixture for submodulefile://protocol #511 for test failure against python 3.14 #509Problem
The
gitconfigfixture had an early return at lines 157-158:If ANYTHING creates
.gitconfigfirst (empty or incomplete) - git itself duringgit init, the nspawn container setup, another fixture - the fixture returns early WITHOUT writingprotocol.file.allow=always.Confirmed by reporter running debug script: empty
.gitconfigwas created by container/git before the fixture could write the proper config.Solution
Remove the early return. The fixture now always writes the complete config with
protocol.file.allow=always.Test plan
test_git_repo_fixture_submodule_file_protocolpasses