libgit2

git_clone_options

Version:

Clone options structure

Initialize with GIT_CLONE_OPTIONS_INIT. Alternatively, you can use git_clone_options_init.

Signature

typedef struct git_clone_options { unsigned int version git_checkout_options checkout_opts git_fetch_options fetch_opts int bare git_clone_local_t local const char *checkout_branch git_repository_create_cb repository_cb void *repository_cb_payload git_remote_create_cb remote_cb void *remote_cb_payload };

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.

fetch_opts

Options which control the fetch, including callbacks.

The callbacks are used for reporting fetch progress, and for acquiring credentials in the event they are needed.

int
bare

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

local

Whether to use a fetch or copy the object database.

const char *
checkout_branch

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

repository_cb

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.

void *
repository_cb_payload

An opaque payload to pass to the git_repository creation callback. This parameter is ignored unless repository_cb is non-NULL.

remote_cb

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.

void *
remote_cb_payload

An opaque payload to pass to the git_remote creation callback. This parameter is ignored unless remote_cb is non-NULL.

Parameter To

Versions