Description
As discussed in issue #1142, shallow clones are not supported yet by the libgit2 clone API.
One can work around this by initializing a repository, setting the core.depth
variable in the config, setup a remote etc. But ... it does not work with git_clone()
.
IMHO the git_clone_options
struct should be extended by an unsigned int depth
variable, which in turn is given to git_clone()
to setup the --depth
config variable.
Also referencing issue #1430 - just for the record.
Thanks for all the support this far and merry christmas to y'all.
EDIT: The remote alias "origin"
is also set in create_and_configure_origin()
. This should be an option as well.
How about adding a git_remote *remote
member in git_clone_options
, that would allow to manually setup a customized remote?