From e7ec327d4b94d8237f6238fb3d282bd3434b2b56 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Tue, 22 Sep 2015 17:56:42 -0400 Subject: [PATCH] patch parse: unset path prefix --- src/patch_parse.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/patch_parse.c b/src/patch_parse.c index 2c16e6497..11e26936c 100644 --- a/src/patch_parse.c +++ b/src/patch_parse.c @@ -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;