libgit2

git_clone_options

Version:

Clone options structure

Use the GIT_CLONE_OPTIONS_INIT to get the default settings, like this:

git_clone_options opts = GIT_CLONE_OPTIONS_INIT;

Signature

typedef struct git_clone_options { unsigned int version git_checkout_options checkout_opts git_remote_callbacks remote_callbacks int bare int ignore_cert_errors git_clone_local_t local const char *remote_name const char *checkout_branch git_signature *signature };

Members

unsigned int
version
checkout_opts

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.

remote_callbacks

Callbacks to use for reporting fetch progress.

int
bare

Set to zero (false) to create a standard repo, or non-zero for a bare repo

int
ignore_cert_errors

Set to 1 if errors validating the remote host's certificate should be ignored.

local

Whether to use a fetch or copy the object database.

const char *
remote_name

The name to be given to the remote that will be created. The default is "origin".

const char *
checkout_branch

The name of the branch to checkout. NULL means use the remote's default branch.

signature

The identity used when updating the reflog. NULL means to use the default signature using the config.

Parameter To

Versions