summaryrefslogtreecommitdiff
path: root/include/git2/diff.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-09-02 02:03:45 -0500
committerEdward Thomson <ethomson@github.com>2016-09-02 02:03:45 -0500
commit1cca150c71cfb0ac9dff0014b9d9b98aa9c3b691 (patch)
treeab3eec2b02c1ce3647c19ca9af0d8270a668bcfa /include/git2/diff.h
parentd66e8c5f895d91e1dc1c72895cd0a90125756045 (diff)
downloadlibgit2-ethomson/diff-only-load-binaries-when-requested.tar.gz
diff: treat binary patches with no data specialethomson/diff-only-load-binaries-when-requested
When creating and printing diffs, deal with binary deltas that have binary data specially, versus diffs that have a binary file but lack the actual binary data.
Diffstat (limited to 'include/git2/diff.h')
-rw-r--r--include/git2/diff.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index c5e463fe3..70664637b 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -490,6 +490,13 @@ typedef struct {
/** Structure describing the binary contents of a diff. */
typedef struct {
+ /**
+ * Whether there is data in this binary structure or not. If this
+ * is non-zero, then this was generated knowing only that a binary
+ * file changed but without providing the data. For example, seeing
+ * only `BBinary files a/file.txt and b/file.txt differ`.
+ */
+ unsigned int empty_data;
git_diff_binary_file old_file; /**< The contents of the old file. */
git_diff_binary_file new_file; /**< The contents of the new file. */
} git_diff_binary;