Repository navigation
Commit 0a9e959
test: preserve hidden gitfiles when preparing submodule aliases
The Windows Python 3.8 partial CI log showed two failures in
`test_submodule_allows_existing_metadata_symlinks`: preparing update and
move aliases raised `PermissionError` before invoking GitPython. Git marks
the submodule's `.git` file hidden; Python's `write_text()` attempts to
recreate it, which Windows rejects for an existing hidden file.
Open that fixture file with `r+`, write the replacement target, and truncate
it. This preserves the hidden attribute while replacing the full contents.
The separate fixture that creates a previously absent gitfile is unchanged.
Validation: all six native/windows37 update, move, and remove alias modes
pass locally. Ruff lint, formatting, and `git diff --check` pass. The
Windows-specific file-attribute behavior will be verified by CI.1 parent 216c706 commit 0a9e959
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
715 | 715 | | |
716 | 716 | | |
717 | 717 | | |
718 | | - | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
719 | 723 | | |
720 | 724 | | |
721 | 725 | | |
| |||
0 commit comments