mirror of
https://github.com/bluekeyes/go-gitdiff
synced 2026-06-08 13:18:30 +00:00
f0da09b10f
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.