git_diff_options

Structure describing options about how the diff should be executed.

Setting all values of the structure to zero will yield the default values. Similarly, passing null for the options structure will give the defaults. The default values are marked below.

Members

Variables

context_lines
uint context_lines;

The number of unchanged lines that define the boundary of a hunk (and to display before and after). Defaults to 3.

flags
uint flags;

A combination of git_diff_option_t values above. Defaults to git_diff_option_t.GIT_DIFF_NORMAL

id_abbrev
ushort id_abbrev;

The abbreviation length to use when formatting object ids. Defaults to the value of 'core.abbrev' from the config, or 7 if unset.

ignore_submodules
libgit2_d.types.git_submodule_ignore_t ignore_submodules;

Overrides the submodule ignore setting for all submodules in the diff.

interhunk_lines
uint interhunk_lines;

The maximum number of unchanged lines between hunk boundaries before the hunks will be merged into one. Defaults to 0.

max_size
libgit2_d.types.git_off_t max_size;

A size (in bytes) above which a blob will be marked as binary automatically; pass a negative value to disable. Defaults to 512MB.

new_prefix
const(char)* new_prefix;

The virtual "directory" prefix for new file names in hunk headers. Defaults to "b".

notify_cb
.git_diff_notify_cb notify_cb;

An optional callback function, notifying the consumer of changes to the diff as new deltas are added.

old_prefix
const(char)* old_prefix;

The virtual "directory" prefix for old file names in hunk headers. Default is "a".

pathspec
libgit2_d.strarray.git_strarray pathspec;

An array of paths / fnmatch patterns to constrain diff. All paths are included by default.

payload
void* payload;

The payload to pass to the callback functions.

progress_cb
.git_diff_progress_cb progress_cb;

An optional callback function, notifying the consumer of which files are being examined as the diff is generated.

version_
uint version_;

version for the struct

Meta