libgit2

git_checkout_opts

Version:

Checkout options structure

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

git_checkout_opts opts = GIT_CHECKOUT_OPTS_INIT;

Signature

typedef struct git_checkout_opts { 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 *our_label const char *their_label };

Members

unsigned int
version
unsigned int
checkout_strategy
int
disable_filters

default will be a dry run

unsigned int
dir_mode

don't apply filters like CRLF conversion

unsigned int
file_mode

default is 0755

int
file_open_flags

default is 0644 or 0755 as dictated by blob

unsigned int
notify_flags

default is O_CREAT | O_TRUNC | O_WRONLY

void *
notify_payload
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
const char *
target_directory

expected content of workdir, defaults to HEAD

const char *
our_label

alternative checkout path to workdir

const char *
their_label

the name of the "our" side of conflicts

Parameter To

Versions