A Go library for parsing and applying patches generated by git diff, git show, and git format-patch. It can also parse and apply unified diffs
generated by the standard diff tool.
No other libraries I found support binary diffs, as generated with the
--binary flag. This is the main reason for writing a new library, as the
format is pretty different from line-oriented diffs and is unique to Git.
Most other packages only parse patches, so you need another package to apply
them (and if they do support applies, it is only for text files.)
This package aims to accept anything that git apply accepts, and closely
follows the logic in apply.c.
It seemed like a fun thing to write and a good way to learn more about Git.