commit a445f1eb6ea75b39508cf4c63ba1bd97154f9aef Author: Billy Keyes Date: Sun Mar 10 17:57:14 2019 -0700 Initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..ddd2cb9 --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +# go-gitdiff + +A Go library for parsing and applying patches generated by `git diff`, `git +show`, and `git format-patch`. + +## Why another diff parser? + +Several libraries with similar functionality already exist, so why make +another? + +1. No other libraries I found support binary diffs, as generated with the + `--binary` flag. This is the main reason for writing a new library. + +2. Most other libraries only parse patches, so you need something else to apply + them (and if they do support applies, it is only for text files.) + +3. The goal is to eventually accept anything that `git apply` accepts, based on + the code in [`apply.c`](https://github.com/git/git/blob/master/apply.c). + +4. It seemed like a fun thing to write.