Edward Thomson
82175084e1
Introduce git_patch_options, handle prefixes
...
Handle prefixes (in terms of number of path components) for patch
parsing.
2016-05-26 13:01:06 -05:00
Edward Thomson
8bca8b9e03
apply: move patch data to patch_common.h
2016-05-26 13:01:04 -05:00
Edward Thomson
804d5fe9f5
patch: abstract patches into diff'ed and parsed
...
Patches can now come from a variety of sources - either internally
generated (from diffing two commits) or as the results of parsing
some external data.
2016-05-26 13:01:04 -05:00
Edward Thomson
8d2eef27ff
patch parsing: ensure empty patches are illegal
2016-05-26 13:01:04 -05:00
Edward Thomson
5d17d72621
patch parsing: parse binary patch files
2016-05-26 13:01:04 -05:00
Edward Thomson
3149ff6f66
patch application: apply binary patches
...
Handle the application of binary patches. Include tests that
produce a binary patch (an in-memory `git_patch` object),
then enusre that the patch applies correctly.
2016-05-26 13:01:03 -05:00
Edward Thomson
0004386f29
apply: handle empty patches
...
When a patch is empty, simply copy the source into the destination.
2016-05-26 11:36:11 -05:00
Edward Thomson
d34f68261e
Patch parsing from patch files
2016-05-26 11:36:11 -05:00
Edward Thomson
7cb904ba44
Introduce git_apply_patch
...
The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
2016-05-26 11:36:11 -05:00