mirror of
https://github.com/bluekeyes/go-gitdiff
synced 2026-06-08 13:18:30 +00:00
f3702115a6
This is a line-oriented parallel to io.ReaderAt, meant for text applies. While the mapping isn't quite as clean as in the binary case, a text apply still reads a fixed chunk of lines starting at a specific line number and modifies them. This also allows a consistent interface for strict and fuzzy applies. The implementation wraps an io.ReaderAt and reads data in chunks, indexing line boundaries as it goes. This is probably not the most efficient way to implement this interface, but it works and allows file application to take a consistent interface.