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.
version for the struct
Overrides the submodule ignore setting for all submodules in the diff.
An array of paths / fnmatch patterns to constrain diff. All paths are included by default.
An optional callback function, notifying the consumer of changes to the diff as new deltas are added.
An optional callback function, notifying the consumer of which files are being examined as the diff is generated.
The payload to pass to the callback functions.
The number of unchanged lines that define the boundary of a hunk (and to display before and after). Defaults to 3.
The maximum number of unchanged lines between hunk boundaries before the hunks will be merged into one. Defaults to 0.
The object ID type to emit in diffs; this is used by functions that operate without a repository - namely git_diff_buffers
, or git_diff_blobs
and git_diff_blob_to_buffer
when one blob is NULL
.
This may be omitted (set to 0
). If a repository is available, the object ID format of the repository will be used. If no repository is available then the default is GIT_OID_SHA
.
If this is specified and a repository is available, then the specified oid_type
must match the repository's object ID format.
The abbreviation length to use when formatting object ids. Defaults to the value of 'core.abbrev' from the config, or 7 if unset.
A size (in bytes) above which a blob will be marked as binary automatically; pass a negative value to disable. Defaults to 512MB.
The virtual "directory" prefix for old file names in hunk headers. Default is "a".
The virtual "directory" prefix for new file names in hunk headers. Defaults to "b".