mirror of
https://github.com/bluekeyes/go-gitdiff
synced 2026-06-08 13:18:30 +00:00
Initial commit
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user