-
Notifications
You must be signed in to change notification settings - Fork 11
Fix git submodule file:// protocol in test fixture
#510
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…rotocol (#509) why: Reproduce the "transport 'file' not allowed" error that occurs in strict build environments when git submodule operations spawn child processes that don't inherit local repo config what: - Add test_gitconfig_submodule_file_protocol test - Uses monkeypatch to simulate isolated git environment - Marked xfail until gitconfig fixture is fixed
…ests why: git submodule operations spawn child processes that don't inherit local repo config, causing "transport 'file' not allowed" errors in strict build environments (#509) what: - Add [protocol "file"] allow = always to gitconfig fixture
why: The gitconfig fixture now includes protocol.file.allow=always what: - Remove xfail marker from test_gitconfig_submodule_file_protocol
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #510 +/- ##
==========================================
+ Coverage 53.22% 53.38% +0.16%
==========================================
Files 38 38
Lines 5676 5696 +20
Branches 1063 1063
==========================================
+ Hits 3021 3041 +20
Misses 2144 2144
Partials 511 511 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
file:// protocol in test fixture
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. 🤖 Generated with Claude Code If this code review was useful, please react with 👍. Otherwise, react with 👎. |
why: Document the pytest plugin fix for strict build environments what: - Add Tests section for 0.39.x release - Note the protocol.file.allow=always addition to gitconfig fixture
why: Document the pytest plugin fix for strict build environments what: - Add Tests section for 0.39.x release - Note the protocol.file.allow=always addition to gitconfig fixture
8fa3ac1 to
67d7791
Compare
why: Document the pytest plugin fix for strict build environments what: - Add Tests section for 0.39.x release - Note the protocol.file.allow=always addition to gitconfig fixture
67d7791 to
c5d4172
Compare
why: Document the pytest plugin fix for strict build environments what: - Add Tests section for 0.39.x release - Note the protocol.file.allow=always addition to gitconfig fixture
c5d4172 to
f2ef0fb
Compare
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
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
## Summary - Fix `gitconfig` fixture to always write config - removes early return that skipped writing when file exists - Follow-up to #510, #511 for #509 ## Problem The `gitconfig` fixture had an early return at lines 157-158: ```python if gitconfig.exists(): return gitconfig ``` If ANYTHING creates `.gitconfig` first (empty or incomplete) - git itself during `git init`, the nspawn container setup, another fixture - the fixture returns early WITHOUT writing `protocol.file.allow=always`. Confirmed by reporter running debug script: empty `.gitconfig` was 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`.
Summary
[protocol "file"] allow = alwaysto gitconfig fixture to fix submodule tests in strict build environmentsRoot Cause
Git submodule operations spawn child processes that don't inherit local repo config. The child
git cloneneedsprotocol.file.allow=alwaysin global config ($HOME/.gitconfig), not just local repo config.Test Plan
test_gitconfig_submodule_file_protocolreproduces the error without fixFixes #509