Commit 69c5c61
fix(repo): preserve literal Cygwin gitfile paths
The `test-cygwin` workflow's `test (fast)` job reported two
`InvalidGitRepositoryError` failures in the new submodule regression.
Cloning preserved the requested metadata directory, but reopening it
expanded the relative path read from the submodule's `.git` file.
Disable expansion when `find_submodule_git_dir()` converts gitfile paths
with `cygpath()`. These paths come from repository metadata and must be
used literally. This completes the Cygwin behavior for
`GHSA-fx3j-rwgx-fr94`.
Extend the existing regression to exercise Cygwin gitfile conversion on
every platform. The same two cases now reproduce locally before the fix
and pass afterward. Git's `read_gitfile_gently()` in `setup.c` at
`d38352cd43ab9745686d697872408bc3249a153f` likewise resolves the literal
gitfile path without environment expansion.
Validation:
- All 22 clone/submodule regression cases pass.
- `test/test_fun.py` and `test/test_submodule.py`: 177 passed, 3 skipped,
and 1 expected failure. The one sandbox-blocked temporary-index test
passed on rerun with access to this worktree's Git metadata directory.
- `ruff check` and `ruff format --check` pass for the changed files.
- `mypy` passes for all 46 checked source files.1 parent b532a50 commit 69c5c61
2 files changed
Lines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
154 | | - | |
| 154 | + | |
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
0 commit comments