libgit2

git_diff_option_t

Version:

Flags for diff options. A combination of these flags can be passed in via the flags value in the git_diff_options.

Values

GIT_DIFF_NORMAL
0

Normal diff, the default

GIT_DIFF_REVERSE
(1 << 0)

Reverse the sides of the diff

GIT_DIFF_FORCE_TEXT
(1 << 1)

Treat all files as text, disabling binary attributes & detection

GIT_DIFF_IGNORE_WHITESPACE
(1 << 2)

Ignore all whitespace

GIT_DIFF_IGNORE_WHITESPACE_CHANGE
(1 << 3)

Ignore changes in amount of whitespace

GIT_DIFF_IGNORE_WHITESPACE_EOL
(1 << 4)

Ignore whitespace at end of line

GIT_DIFF_IGNORE_SUBMODULES
(1 << 5)

Exclude submodules from the diff completely

GIT_DIFF_PATIENCE
(1 << 6)

Use the "patience diff" algorithm (currently unimplemented)

GIT_DIFF_INCLUDE_IGNORED
(1 << 7)

Include ignored files in the diff list

GIT_DIFF_INCLUDE_UNTRACKED
(1 << 8)

Include untracked files in the diff list

GIT_DIFF_INCLUDE_UNMODIFIED
(1 << 9)

Include unmodified files in the diff list

GIT_DIFF_RECURSE_UNTRACKED_DIRS
(1 << 10)

Even with GIT_DIFF_INCLUDE_UNTRACKED, an entire untracked directory will be marked with only a single entry in the diff list; this flag adds all files under the directory as UNTRACKED entries, too.

GIT_DIFF_DISABLE_PATHSPEC_MATCH
(1 << 11)

If the pathspec is set in the diff options, this flags means to apply it as an exact match instead of as an fnmatch pattern.

GIT_DIFF_DELTAS_ARE_ICASE
(1 << 12)

Use case insensitive filename comparisons

GIT_DIFF_INCLUDE_UNTRACKED_CONTENT
(1 << 13)

When generating patch text, include the content of untracked files

GIT_DIFF_SKIP_BINARY_CHECK
(1 << 14)

Disable updating of the binary flag in delta records. This is useful when iterating over a diff if you don't need hunk and data callbacks and want to avoid having to load file completely.

GIT_DIFF_INCLUDE_TYPECHANGE
(1 << 15)

Normally, a type change between files will be converted into a DELETED record for the old and an ADDED record for the new; this options enabled the generation of TYPECHANGE delta records.

GIT_DIFF_INCLUDE_TYPECHANGE_TREES
(1 << 16)

Even with GIT_DIFF_INCLUDE_TYPECHANGE, blob->tree changes still generally show as a DELETED blob. This flag tries to correctly label blob->tree transitions as TYPECHANGE records with new_file's mode set to tree. Note: the tree SHA will not be available.

GIT_DIFF_IGNORE_FILEMODE
(1 << 17)

Ignore file mode changes

GIT_DIFF_RECURSE_IGNORED_DIRS
(1 << 18)

Even with GIT_DIFF_INCLUDE_IGNORED, an entire ignored directory will be marked with only a single entry in the diff list; this flag adds all files under the directory as IGNORED entries, too.

Versions