Reproduction steps
Call git_submodule_update with a submodule configured in 'gitmodules' and init=1 on a repo that does not contain the submodule directory.
Expected behavior
Submodule should be cloned and checked out or silently fail to update (this is what git itself does)
Actual behavior
git_submodule_update returns ENOENT.
Version of libgit2 (release number or SHA1)
a3841af
Operating system(s) tested
GNU/Linux
Example code
This was tested with a local copy of https://github.com/facebookincubator/gloo at commit 950c0e23819779a9e0c70b861db4c52b31d1d1b2 and the following test:
lib.txt
which returns the following error:
1) Failure: submodule::update::update_missing_submodule [/src/libgit2/tests/libgit2/submodule/update.c:225] Function call failed: (git_submodule_update(sm, 1, &update_options)) error -3 - failed to resolve path '/src/gloo/third-party/googletest/.git': No such file or directory