diff options
| author | Edward Thomson <ethomson@microsoft.com> | 2015-09-22 17:56:42 -0400 |
|---|---|---|
| committer | Edward Thomson <ethomson@github.com> | 2016-05-26 13:01:04 -0500 |
| commit | e7ec327d4b94d8237f6238fb3d282bd3434b2b56 (patch) | |
| tree | 3bfac8233502dfe52c3d808479965f5fba99bc13 /src/patch_parse.c | |
| parent | 8bca8b9e0379910686937380e5ac459c51a4864f (diff) | |
| download | libgit2-e7ec327d4b94d8237f6238fb3d282bd3434b2b56.tar.gz | |
patch parse: unset path prefix
Diffstat (limited to 'src/patch_parse.c')
| -rw-r--r-- | src/patch_parse.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |
