libgit2

git_checkout_options

Version:

Checkout options structure

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

git_checkout_options opts = 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 const char *target_directory const char *ancestor_label const char *our_label const char *their_label };

Members

unsigned int
version
unsigned int
checkout_strategy

default will be a dry run

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
void *
notify_payload
progress_cb

Optional callback to notify the consumer of checkout progress.

void *
progress_payload
paths

When not zeroed out, array of fnmatch patterns specifying which paths should be taken into account, otherwise all files. Use GIT_CHECKOUT_DISABLE_PATHSPEC_MATCH to treat as simple list.

baseline

expected content of workdir, defaults to HEAD

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

Parameter To

Versions