Clone options structure
Use the GIT_CLONE_OPTIONS_INIT to get the default settings, like this:
git_clone_options opts = GIT_CLONE_OPTIONS_INIT;
These options are passed to the checkout step. To disable checkout, set the checkout_strategy
to GIT_CHECKOUT_NONE
. Generally you will want the use GIT_CHECKOUT_SAFE_CREATE to create all files in the working directory for the newly cloned repository.
Callbacks to use for reporting fetch progress, and for acquiring credentials in the event they are needed. This parameter is ignored if the remote_cb parameter is set; if you provide a remote creation callback, then you have the opportunity to configure remote callbacks in provided function.
Set to zero (false) to create a standard repo, or non-zero for a bare repo
The name of the branch to checkout. NULL means use the remote's default branch.
The identity used when updating the reflog. NULL means to use the default signature using the config.
A callback used to create the new repository into which to clone. If NULL, the 'bare' field will be used to determine whether to create a bare repository.
An opaque payload to pass to the git_repository creation callback. This parameter is ignored unless repository_cb is non-NULL.
A callback used to create the git_remote, prior to its being used to perform the clone operation. See the documentation for git_remote_create_cb for details. This parameter may be NULL, indicating that git_clone should provide default behavior.
An opaque payload to pass to the git_remote creation callback. This parameter is ignored unless remote_cb is non-NULL.