summaryrefslogtreecommitdiff
path: root/src/patch_parse.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-09-23 09:54:25 -0400
committerEdward Thomson <ethomson@github.com>2016-05-26 13:01:05 -0500
commit1462c95a5d6d365e2f4fe686d186aecee8374b0c (patch)
treefb06a128998c786a50d13c77e34d87f6c140610b /src/patch_parse.c
parent2f3b922ff1695f79b942d62ee8982a7d16ea7dfd (diff)
downloadlibgit2-1462c95a5d6d365e2f4fe686d186aecee8374b0c.tar.gz
patch_parse: set binary flag
We may have parsed binary data, set the `SHOW_BINARY` flag which indicates that we have actually computed a binary diff.
Diffstat (limited to 'src/patch_parse.c')
-rw-r--r--src/patch_parse.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/patch_parse.c b/src/patch_parse.c
index d32d351e8..a450ecc05 100644
--- a/src/patch_parse.c
+++ b/src/patch_parse.c
@@ -885,6 +885,7 @@ int git_patch_from_patchfile(
/* TODO: allow callers to specify prefix depth (eg, `-p2`) */
patch->base.diff_opts.new_prefix = "";
patch->base.diff_opts.old_prefix = "";
+ patch->base.diff_opts.flags |= GIT_DIFF_SHOW_BINARY;
patch->base.delta = git__calloc(1, sizeof(git_diff_delta));
patch->base.delta->status = GIT_DELTA_MODIFIED;