patch parse: unset path prefix

This commit is contained in:
Edward Thomson 2015-09-22 17:56:42 -04:00 committed by Edward Thomson
parent 8bca8b9e03
commit e7ec327d4b

View File

@ -884,6 +884,10 @@ int git_patch_from_patchfile(
patch = git__calloc(1, sizeof(git_patch_parsed));
GITERR_CHECK_ALLOC(patch);
/* TODO: allow callers to specify prefix depth (eg, `-p2`) */
patch->base.diff_opts.new_prefix = "";
patch->base.diff_opts.old_prefix = "";
patch->base.delta = git__calloc(1, sizeof(git_diff_delta));
patch->base.delta->status = GIT_DELTA_MODIFIED;