libgit2

git_diff_options_init

Version:

Initialize diff options structure

In most cases, you can probably just use GIT_DIFF_OPTIONS_INIT to initialize the diff options structure, but in some cases that is not going to work. You can call this function instead. Note that you must pass both a pointer to the structure to be initialized and the GIT_DIFF_OPTIONS_VERSION value from the header you compiled with.

Signature

int git_diff_options_init(git_diff_options *options, unsigned int version);

Parameters

In
options

Pointer to git_diff_options memory to be initialized

unsigned int
In
version

Returns

int

0 on success, negative on failure (such as unsupported version)

Versions