git_diff_option_t enum

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

Inheritance
Available extensions

Values

GIT_DIFF_NORMAL → const git_diff_option_t

Normal diff, the default

const git_diff_option_t(0)
GIT_DIFF_REVERSE → const git_diff_option_t

Reverse the sides of the diff

const git_diff_option_t(1)
GIT_DIFF_INCLUDE_IGNORED → const git_diff_option_t

Include ignored files in the diff

const git_diff_option_t(2)
GIT_DIFF_RECURSE_IGNORED_DIRS → const git_diff_option_t

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

const git_diff_option_t(4)
GIT_DIFF_INCLUDE_UNTRACKED → const git_diff_option_t

Include untracked files in the diff

const git_diff_option_t(8)
GIT_DIFF_RECURSE_UNTRACKED_DIRS → const git_diff_option_t

Even with GIT_DIFF_INCLUDE_UNTRACKED, an entire untracked directory will be marked with only a single entry in the diff (a la what core Git does in git status); this flag adds all files under untracked directories as UNTRACKED entries, too.

const git_diff_option_t(16)
GIT_DIFF_INCLUDE_UNMODIFIED → const git_diff_option_t

Include unmodified files in the diff

const git_diff_option_t(32)
GIT_DIFF_INCLUDE_TYPECHANGE → const git_diff_option_t

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.

const git_diff_option_t(64)
GIT_DIFF_INCLUDE_TYPECHANGE_TREES → const git_diff_option_t

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.

const git_diff_option_t(128)
GIT_DIFF_IGNORE_FILEMODE → const git_diff_option_t

Ignore file mode changes

const git_diff_option_t(256)
GIT_DIFF_IGNORE_SUBMODULES → const git_diff_option_t

Treat all submodules as unmodified

const git_diff_option_t(512)
GIT_DIFF_IGNORE_CASE → const git_diff_option_t

Use case insensitive filename comparisons

const git_diff_option_t(1024)
GIT_DIFF_INCLUDE_CASECHANGE → const git_diff_option_t

May be combined with GIT_DIFF_IGNORE_CASE to specify that a file that has changed case will be returned as an add/delete pair.

const git_diff_option_t(2048)
GIT_DIFF_DISABLE_PATHSPEC_MATCH → const git_diff_option_t

If the pathspec is set in the diff options, this flags indicates that the paths will be treated as literal paths instead of fnmatch patterns. Each path in the list must either be a full path to a file or a directory. (A trailing slash indicates that the path will only match a directory). If a directory is specified, all children will be included.

const git_diff_option_t(4096)
GIT_DIFF_SKIP_BINARY_CHECK → const git_diff_option_t

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.

const git_diff_option_t(8192)
GIT_DIFF_ENABLE_FAST_UNTRACKED_DIRS → const git_diff_option_t

When diff finds an untracked directory, to match the behavior of core Git, it scans the contents for IGNORED and UNTRACKED files. If all contents are IGNORED, then the directory is IGNORED; if any contents are not IGNORED, then the directory is UNTRACKED. This is extra work that may not matter in many cases. This flag turns off that scan and immediately labels an untracked directory as UNTRACKED (changing the behavior to not match core Git).

const git_diff_option_t(16384)
GIT_DIFF_UPDATE_INDEX → const git_diff_option_t

When diff finds a file in the working directory with stat information different from the index, but the OID ends up being the same, write the correct stat information into the index. Note: without this flag, diff will always leave the index untouched.

const git_diff_option_t(32768)
GIT_DIFF_INCLUDE_UNREADABLE → const git_diff_option_t

Include unreadable files in the diff

const git_diff_option_t(65536)
GIT_DIFF_INCLUDE_UNREADABLE_AS_UNTRACKED → const git_diff_option_t

Include unreadable files in the diff

const git_diff_option_t(131072)
GIT_DIFF_INDENT_HEURISTIC → const git_diff_option_t

Use a heuristic that takes indentation and whitespace into account which generally can produce better diffs when dealing with ambiguous diff hunks.

const git_diff_option_t(262144)
GIT_DIFF_IGNORE_BLANK_LINES → const git_diff_option_t

Ignore blank lines

const git_diff_option_t(524288)
GIT_DIFF_FORCE_TEXT → const git_diff_option_t

Treat all files as text, disabling binary attributes & detection

const git_diff_option_t(1048576)
GIT_DIFF_FORCE_BINARY → const git_diff_option_t

Treat all files as binary, disabling text diffs

const git_diff_option_t(2097152)
GIT_DIFF_IGNORE_WHITESPACE → const git_diff_option_t

Ignore all whitespace

const git_diff_option_t(4194304)
GIT_DIFF_IGNORE_WHITESPACE_CHANGE → const git_diff_option_t

Ignore changes in amount of whitespace

const git_diff_option_t(8388608)
GIT_DIFF_IGNORE_WHITESPACE_EOL → const git_diff_option_t

Ignore whitespace at end of line

const git_diff_option_t(16777216)
GIT_DIFF_SHOW_UNTRACKED_CONTENT → const git_diff_option_t

When generating patch text, include the content of untracked files. This automatically turns on GIT_DIFF_INCLUDE_UNTRACKED but it does not turn on GIT_DIFF_RECURSE_UNTRACKED_DIRS. Add that flag if you want the content of every single UNTRACKED file.

const git_diff_option_t(33554432)
GIT_DIFF_SHOW_UNMODIFIED → const git_diff_option_t

When generating output, include the names of unmodified files if they are included in the git_diff. Normally these are skipped in the formats that list files (e.g. name-only, name-status, raw). Even with this, these will not be included in patch format.

const git_diff_option_t(67108864)
GIT_DIFF_PATIENCE → const git_diff_option_t

Use the "patience diff" algorithm

const git_diff_option_t(268435456)
GIT_DIFF_MINIMAL → const git_diff_option_t

Take extra time to find minimal diff

const git_diff_option_t(536870912)
GIT_DIFF_SHOW_BINARY → const git_diff_option_t

Include the necessary deflate / delta information so that git-apply can apply given diff information to binary files.

const git_diff_option_t(1073741824)

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
name String

Available on Enum, provided by the EnumName extension

The name of the enum value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value int
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromValue(int value) git_diff_option_t

Constants

values → const List<git_diff_option_t>
A constant List of the values in this enum, in order of their declaration.