libgit2

git_fetch_options

Version:

Fetch options structure.

Zero out for defaults. Initialize with GIT_FETCH_OPTIONS_INIT macro to correctly set the version field. E.g.

git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;

Signature

typedef struct git_fetch_options { int version git_remote_callbacks callbacks git_fetch_prune_t prune unsigned int update_fetchhead unsigned int report_unchanged git_remote_autotag_option_t download_tags git_proxy_options proxy_opts int depth git_remote_redirect_t follow_redirects git_strarray custom_headers };

Members

int
version
callbacks

Callbacks to use for this fetch operation

prune

Whether to perform a prune after the fetch

unsigned int
update_fetchhead

How to handle reference updates; see git_remote_update_flags.

unsigned int
report_unchanged

How to handle reference updates; see git_remote_update_flags.

download_tags

Determines how to behave regarding tags on the remote, such as auto-downloading tags for objects we're downloading or downloading all of them.

The default is to auto-follow tags.

proxy_opts

Proxy options to use, by default no proxy is used.

int
depth

Depth of the fetch to perform, or GIT_FETCH_DEPTH_FULL (or 0) for full history, or GIT_FETCH_DEPTH_UNSHALLOW to "unshallow" a shallow repository.

The default is full (GIT_FETCH_DEPTH_FULL or 0).

follow_redirects

Whether to allow off-site redirects. If this is not specified, the http.followRedirects configuration setting will be consulted.

custom_headers

Extra headers for this fetch operation

Parameter To

Versions