summaryrefslogtreecommitdiff
path: root/tests/patch/print.c
Commit message (Collapse)AuthorAgeFilesLines
* patch: correctly handle mode changes for renamesPatrick Steinhardt2020-03-261-0/+6
| | | | | | | | | | | When generating a patch for a renamed file whose mode bits have changed in addition to the rename, then we currently fail to parse the generated patch. Furthermore, when generating a diff we output mode bits after the similarity metric, which is different to how upstream git handles it. Fix both issues by adding another state transition that allows similarity indices after mode changes and by printing mode changes before the similarity index.
* patch_parse: correct parsing of patch containing not shown binary data.Gregory Herrero2019-11-191-0/+6
| | | | | | | | When not shown binary data is added or removed in a patch, patch parser is currently returning 'error -1 - corrupt git binary header at line 4'. Fix it by correctly handling case where binary data is added/removed. Signed-off-by: Gregory Herrero <gregory.herrero@oracle.com>
* Convert usage of `git_buf_free` to new `git_buf_dispose`Patrick Steinhardt2018-06-101-1/+1
|
* diff: treat binary patches with no data specialethomson/diff-read-empty-binaryEdward Thomson2016-09-051-0/+6
| | | | | | When creating and printing diffs, deal with binary deltas that have binary data specially, versus diffs that have a binary file but lack the actual binary data.
* git_patch_parse_ctx: refcount the contextEdward Thomson2016-05-261-0/+1
|
* patch: `git_patch_from_patchfile` -> `git_patch_from_buffer`Edward Thomson2016-05-261-1/+2
|
* Introduce git_patch_options, handle prefixesEdward Thomson2016-05-261-1/+1
| | | | | Handle prefixes (in terms of number of path components) for patch parsing.
* patch_parse: test roundtrip patch parsing -> printEdward Thomson2016-05-261-0/+166