You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a repository that has a submodule called "mysubmodule".
Change directory to a folder which has a subfolder called "mysubmodule".
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
The text was updated successfully, but these errors were encountered:
We also ran into this issue via the cargo generate tool which uses libgit2 as its dependency.
As I see it in git_submodule_update the submodule is cloned only if it is uninitialized. As a result it seems safe to use git_clone__submodule instead of git_clone here
Reproduction steps
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
The text was updated successfully, but these errors were encountered: