-
-
Notifications
You must be signed in to change notification settings - Fork 951
Closed
Labels
Description
When using the git.objects.submodules.base.Submodule.update method (https://gitpython.readthedocs.io/en/stable/reference.html#git.objects.submodule.base.Submodule.update), the git python module seems to fake a git submodule
call with git clone
. It executes git clone -n --separate-git-dir=<workspace>/.git/modules/<submodule_path> -v <submodule_url> <workspace>/<submodule_path>
. This command doesn't work when a submodule is specified as a relative path in the .gitmodules
path. For example:
[submodule "main_project/submodule"]
path = main_project/submodule
url = ../../other_project/some_module.git
The git.objects.submodules.base.Submodule.update
then fails with `repository '../../other_project/some_module.git' does not exist.
The regular git submodule
command is able to resolve the paths.