diff options
| author | Russell Belfer <rb@github.com> | 2012-09-05 15:00:40 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2012-09-06 15:34:02 -0700 |
| commit | 60b9d3fcef04a6beb0ad4df225ada058afabf0b9 (patch) | |
| tree | efc9e427753619d29d1df56b0ea97446f1a3f9d9 /src/fileops.h | |
| parent | 8f9b6a132b358b23b518197240184e2f08e0a913 (diff) | |
| download | libgit2-60b9d3fcef04a6beb0ad4df225ada058afabf0b9.tar.gz | |
Implement 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.
Diffstat (limited to 'src/fileops.h')
| -rw-r--r-- | src/fileops.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/fileops.h b/src/fileops.h index 5c23ce30b..d2944f460 100644 --- a/src/fileops.h +++ b/src/fileops.h @@ -19,6 +19,7 @@ */ extern int git_futils_readbuffer(git_buf *obj, const char *path); extern int git_futils_readbuffer_updated(git_buf *obj, const char *path, time_t *mtime, int *updated); +extern int git_futils_readbuffer_fd(git_buf *obj, git_file fd, size_t len); /** * File utils |
