git_diff_binary_t

Structure describing the binary contents of a diff.

A binary file / delta is a file (or pair) for which no text diffs should be generated. A diff can contain delta entries that are binary, but no diff content will be output for those files. There is a base heuristic for binary detection and you can further tune the behavior with git attributes or diff flags and option settings.

Values

ValueMeaning
GIT_DIFF_BINARY_NONE

Whether there is data in this binary structure or not.

If this is 1, then this was produced and included binary content. If this is 0 then this was generated knowing only that a binary file changed but without providing the data, probably from a patch that said Binary files a/file.txt and b/file.txt differ.

GIT_DIFF_BINARY_LITERAL

The binary data is the literal contents of the file.

GIT_DIFF_BINARY_DELTA

The binary data is the delta from one side to the other.

Meta