libgit2

git_diff_binary

Version:

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.

Signature

typedef struct git_diff_binary { unsigned int contains_data git_diff_binary_file old_file git_diff_binary_file new_file };

Members

unsigned int
contains_data

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.

old_file

The contents of the old file.

new_file

The contents of the new file.

Parameter To

Versions