Skip to content

Commit 0aa77e4

Browse files
codexByron
authored andcommitted
fixup! review
The `Python package` Windows jobs fail in `test_root_update_skips_old_url_resolution_when_remote_matches[False]` with `AssertionError: Previous URL does not need resolving`. The fixture writes `source.working_tree_dir` with native backslashes into `.gitmodules`, while `git clone` stores the submodule remote URL with forward slashes. The test therefore requests a remote change instead of exercising the intended existing-remote shortcut. Pass the fixture's new URL through `Git.polish_url`, matching the stored remote on Windows as well as POSIX. The production URL resolver and remote-change behavior do not need changing. Validation: both targeted dry-run cases pass. An assert-based local reproduction using backslash paths fails before this change and passes afterwards. The relative URL tests pass (32 passed, 2 platform skips), the offline submodule update tests pass (68 passed), and Ruff lint, formatting, and `git diff --check` pass. Local test commits use a command-scoped `commit.gpgSign=false` setting. Native Windows validation is delegated to the PR CI jobs.
1 parent fb5e11f commit 0aa77e4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎test/test_submodule.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ def test_root_update_skips_old_url_resolution_when_remote_matches(tmp_path, dry_
103103
writer.set_value("url", "../source")
104104
previous = parent.index.commit("Record relative submodule URL")
105105
with submodule.config_writer() as writer:
106-
writer.set_value("url", source.working_tree_dir)
106+
writer.set_value("url", Git.polish_url(source.working_tree_dir))
107107
parent.index.commit("Use existing remote URL")
108108

109109
resolve_url = Submodule._resolved_url

0 commit comments

Comments
 (0)