summaryrefslogtreecommitdiff
path: root/tests/apply/fromdiff.c
Commit message (Collapse)AuthorAgeFilesLines
* tests: apply: verify that we correctly truncate the source bufferPatrick Steinhardt2019-02-211-0/+33
| | | | | | | | | | Previously, we would fail to correctly truncate the source buffer if the source has more than one line and ends with a non-newline character. In the following call, we thus truncate the source string in the middle of the second line. Without the bug fixed, we would successfully apply the patch to the source and return success. With the overflow being fixed, we should return an error now.
* patch: add support for partial patch applicationJason Haslam2018-11-051-0/+46
| | | | Add hunk callback parameter to git_apply__patch to allow hunks to be skipped.
* apply: introduce a hunk callbackEdward Thomson2018-11-051-1/+1
| | | | | Introduce a callback to patch application that allows consumers to cancel hunk application.
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-2/+2
|
* apply: move patch data to patch_common.hEdward Thomson2016-05-261-1/+1
|
* patch application: apply binary patchesEdward Thomson2016-05-261-11/+116
| | | | | | 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.
* apply: handle empty patchesEdward Thomson2016-05-261-0/+8
| | | | When a patch is empty, simply copy the source into the destination.
* Introduce git_apply_patchEdward Thomson2016-05-261-0/+176
The beginnings of patch application from an existing (diff-created) git_patch object: applies the hunks of a git_patch to a buffer.