Repository navigation
Commit ff48765
test(refs): keep PathLike reference names portable on Windows
`test_revision_arguments_preserve_pathlike_paths` fails in the Windows
`Python package` jobs because `Path("refs/heads/main")` emits
`refs\heads\main`. Git rejects backslashes in reference names, so the
test raises `ValueError: Invalid reference` before exercising revision
argument handling. All four combinations of SHA-1/SHA-256 and
files/reftable fail. The same failures are present in the final Windows
Python 3.14t job for the introducing PR #2336, so this is inherited by
PR #2339 rather than caused by its blame-content change.
Use `PurePosixPath` for the reference-name test parameter. Reference
names use forward slashes on every platform; filesystem paths elsewhere
in the tests continue to use `Path`. Keep `PathLikeMock` coverage and
the existing reference validation unchanged.
Validation: 28 focused reference/revision tests pass on each of the
`cli` and `gix` backends, including all eight PathLike cases, nested
merge-base operands, reflog walks, fork-point lookup, and remote archives.
Both blame-content regressions also pass on each backend. Ruff 0.17.2
lint and formatting checks pass for `test/test_refs.py`; `git diff --check`
passes. Windows validation is left to the PR's CI matrix.
Agent-Model: unknown1 parent 35027d1 commit ff48765
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
270 | 270 | | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
| |||
0 commit comments