Skip to content

submodule update doesn't work with relative submodule paths (in GitPython 2.1.14) #944

@Genovese-martijn

Description

@Genovese-martijn

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy