Skip to content

git_submodule_update should call git_clone__submodule instead of git_clone to omit the path check #5830

@lrm29

Description

@lrm29

Reproduction steps

  1. Create a repository that has a submodule called "mysubmodule".
  2. Change directory to a folder which has a subfolder called "mysubmodule".
  3. Clone the main repository and then call git_submodule_update on "mysubmodule".

Expected behavior

The submodule is initialised and cloned.

Actual behavior

Unable to clone the submodule with error:
Error code = -4, Error class = 3. "mysubmodule" exists and is not an empty directory.

The path check in git__clone checks the current directory, rather than the repository working directory. If omitting the path check is undesirable, perhaps there's another solution.

Version of libgit2 (release number or SHA1)

1.0.0

Operating system(s) tested

Windows

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions