Clone a remote repository.
By default this creates its repository and initial remote to match git's defaults. You can use the options in the callback to customize how these are created.
Note that the libgit2 library must be initialized using
git_libgit2_init
before any APIs can be called, including
this one.
the remote repository to clone
local directory to clone to
configuration options for the clone. If NULL, the function works as though GIT_OPTIONS_INIT were passed.
0 on success, any non-zero return value from a callback function, or a negative value to indicate an error (use git_error_last
for a detailed error message)