Commit 1367c9a
authored
pytest(gitconfig) Avoid always reusing
## 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`.gitconfig (#512)2 files changed
Lines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
23 | 34 | | |
24 | 35 | | |
25 | 36 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | 157 | | |
161 | 158 | | |
162 | 159 | | |
| |||
0 commit comments