libgit2

git_apply_options

Version:

Apply options structure.

When the callback:

  • returns < 0, the apply process will be aborted.
  • returns > 0, the hunk will not be applied, but the apply process continues
  • returns 0, the hunk is applied, and the apply process continues.

Initialize with GIT_APPLY_OPTIONS_INIT. Alternatively, you can use git_apply_options_init.

See

Signature

typedef struct git_apply_options { unsigned int version git_apply_delta_cb delta_cb git_apply_hunk_cb hunk_cb void *payload unsigned int flags };

Members

unsigned int
version

The version

delta_cb

When applying a patch, callback that will be made per delta (file).

hunk_cb

When applying a patch, callback that will be made per hunk.

void *
payload

Payload passed to both delta_cb & hunk_cb.

unsigned int
flags

Bitmask of git_apply_flags_t

Parameter To

Versions