libgit2

git_checkout_options

Version:

Checkout options structure

Initialize with GIT_CHECKOUT_OPTIONS_INIT. Alternatively, you can use git_checkout_options_init.

Signature

typedef struct git_checkout_options { unsigned int version unsigned int checkout_strategy int disable_filters unsigned int dir_mode unsigned int file_mode int file_open_flags unsigned int notify_flags git_checkout_notify_cb notify_cb void *notify_payload git_checkout_progress_cb progress_cb void *progress_payload git_strarray paths git_tree *baseline git_index *baseline_index const char *target_directory const char *ancestor_label const char *our_label const char *their_label git_checkout_perfdata_cb perfdata_cb void *perfdata_payload };

Members

unsigned int
version

The version

unsigned int
checkout_strategy

default will be a safe checkout

int
disable_filters

don't apply filters like CRLF conversion

unsigned int
dir_mode

default is 0755

unsigned int
file_mode

default is 0644 or 0755 as dictated by blob

int
file_open_flags

default is O_CREAT | O_TRUNC | O_WRONLY

unsigned int
notify_flags
notify_cb

Optional callback to get notifications on specific file states.

void *
notify_payload

Payload passed to notify_cb

progress_cb

Optional callback to notify the consumer of checkout progress.

void *
progress_payload

Payload passed to progress_cb

paths

A list of wildmatch patterns or paths.

By default, all paths are processed. If you pass an array of wildmatch patterns, those will be used to filter which paths should be taken into account.

Use GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as a simple list.

baseline

The expected content of the working directory; defaults to HEAD.

If the working directory does not match this baseline information, that will produce a checkout conflict.

baseline_index

Like baseline above, though expressed as an index. This option overrides baseline.

const char *
target_directory

alternative checkout path to workdir

const char *
ancestor_label

the name of the common ancestor side of conflicts

const char *
our_label

the name of the "our" side of conflicts

const char *
their_label

the name of the "their" side of conflicts

perfdata_cb

Optional callback to notify the consumer of performance data.

void *
perfdata_payload

Payload passed to perfdata_cb

Parameter To

Versions