summaryrefslogtreecommitdiff
path: root/tests/patch/parse.c
Commit message (Collapse)AuthorAgeFilesLines
* patch_parse: allow parsing ambiguous patch headersPatrick Steinhardt2017-11-111-0/+6
| | | | | | | | | | | | | | | The git patch format allows for having unquoted paths with whitespaces inside. This format becomes ambiguous to parse, e.g. in the following example: diff --git a/file b/with spaces.txt b/file b/with spaces.txt While we cannot parse this in a correct way, we can instead use the "---" and "+++" lines to retrieve the file names, as the path is not followed by anything here but spans the complete remaining line. Because of this, we can simply bail outwhen parsing the "diff --git" header here without an actual error and then proceed to just take the paths from the other headers.
* patch: differentiate not found and invalid patchesEdward Thomson2016-05-261-6/+75
|
* 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-3/+5
| | | | | Handle prefixes (in terms of number of path components) for patch parsing.
* patch_parse: ensure we can parse a patchEdward Thomson2016-05-261-0/+31