Skip to content

fix updating submodules with relative urls #2051

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

david0
Copy link
Contributor

@david0 david0 commented Jun 11, 2025

This fixes running repo.update_submodules(init=True) on repositories that are using relative for the modules.

It tries to emulate the git behavior: https://github.com/git/git/blob/master/builtin/submodule--helper.c#L503

Fixes #730

This fixes running repo.update_submodules(init=True) on repositories
that are using relative for the modules.

Fixes gitpython-developers#730
@david0 david0 force-pushed the fix-issue-730-relative-submodule branch from 76f3bf3 to 1d80891 Compare June 11, 2025 12:14
Copy link
Member

@Byron Byron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

Even though I cannot truly say I know this is correct, there is a test that would probably fail with an exception without the fix so it's better than before.

@Byron Byron merged commit 7677c05 into gitpython-developers:main Jun 11, 2025
27 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Submodule from relative URL
2 participants