Skip to content

fix(submodules): use forward slashes in submodule name lookup on Windows#2970

Open
Noethix55555 wants to merge 1 commit into
gitui-org:masterfrom
Noethix55555:fix/submodule-parent-windows
Open

fix(submodules): use forward slashes in submodule name lookup on Windows#2970
Noethix55555 wants to merge 1 commit into
gitui-org:masterfrom
Noethix55555:fix/submodule-parent-windows

Conversation

@Noethix55555

Copy link
Copy Markdown

submodule_parent_info derives the submodule name from the stripped path using to_string_lossy(). On Windows this produces backslash-separated components (e.g. sub\nested), but libgit2's find_submodule expects forward slashes. The lookup always fails on Windows, so submodule_parent_info returns None for any submodule.

Fix: call .replace('\', "/") on the lossy string before passing it to find_submodule.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant