mirror of
https://git.proxmox.com/git/libgit2
synced 2025-06-21 20:34:17 +00:00
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.
This commit is contained in:
parent
2f3b922ff1
commit
1462c95a5d
@ -885,6 +885,7 @@ int git_patch_from_patchfile(
|
|||||||
/* TODO: allow callers to specify prefix depth (eg, `-p2`) */
|
/* TODO: allow callers to specify prefix depth (eg, `-p2`) */
|
||||||
patch->base.diff_opts.new_prefix = "";
|
patch->base.diff_opts.new_prefix = "";
|
||||||
patch->base.diff_opts.old_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 = git__calloc(1, sizeof(git_diff_delta));
|
||||||
patch->base.delta->status = GIT_DELTA_MODIFIED;
|
patch->base.delta->status = GIT_DELTA_MODIFIED;
|
||||||
|
Loading…
Reference in New Issue
Block a user