Commit Graph

4 Commits

Author SHA1 Message Date
Billy Keyes b5ae0bd443 Rename PatchHeader.Message to .Body (#7)
Git usually refers to the whole thing (title + body) as the "commit
message", so using different terms for the parts clarifies things. Also
add a new Message() function that returns the combined string.
2020-04-26 20:00:20 -07:00
Billy Keyes 546a186b39 Fix minor documentation issues 2020-04-18 22:39:42 -07:00
Billy Keyes 5609b2d456 Fix typo in comment 2020-04-18 22:23:12 -07:00
Billy Keyes f0da09b10f Add ParsePatchHeader and related types (#6)
This function parses patch headers (the preamble returned by the
existing Parse function) to extract information about the commit that
generated the patch. This is useful when patches are an interchange
format and this library is applying commits generated elsewhere.

Because of the variety of header formats, parsing is fairly lenient and
best-effort, although certain invalid input does cause errors.

This also extracts some test utilities from the apply tests for reuse.
2020-04-18 22:21:55 -07:00