Initial commit

This commit is contained in:
Billy Keyes
2019-03-10 17:57:14 -07:00
commit a445f1eb6e
+20
View File
@@ -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.