summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-09-06 10:43:21 -0500
committerGitHub <noreply@github.com>2016-09-06 10:43:21 -0500
commit9ad07fc003f553f29f515c64073caea276eb3270 (patch)
treeb702e4594c1b56a1d9fe9acb78356a5d9b32d135 /include/git2
parent46035d984fc025d9acc0be2ffdeea21966b06aed (diff)
parentadedac5aba9e4525475fd59d751cd02c6f2b3a4f (diff)
downloadlibgit2-9ad07fc003f553f29f515c64073caea276eb3270.tar.gz
Merge pull request #3923 from libgit2/ethomson/diff-read-empty-binary
Read binary patches (with no binary data)
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/diff.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/git2/diff.h b/include/git2/diff.h
index c5e463fe3..4f0871dab 100644
--- a/include/git2/diff.h
+++ b/include/git2/diff.h
@@ -490,6 +490,14 @@ 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 `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`.
+ */
+ unsigned int contains_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;