libgit2/libgit2 — pull request #916 by arrbee (2012-09-05 22:11:02+00:00)
Title: Implement crlf filters for status/diff blobs

This adds support to diff and status for running filters (a la crlf) on blobs in the workdir before computing SHAs and before generating text diffs. This ended up being a bit more code change than I had thought since I had to reorganize some of the diff logic to minimize peak memory use when filtering blobs in a diff.

This also adds a cap on the maximum size of data that will be loaded to diff. I set it at 512Mb which should match core git. Right now it is a #define in src/diff.h but it could be moved into the public API if desired.

Right now this PR includes the commits from #691 (unit test demonstrating crlf filtering problem) and #910 (diff iterators). Before this is merged, both of those should be merged and this can be rebased. Sorry that this makes the crlf filter code hard to review - let's get #910 merged and this will be a lot easier to read.