diff options
author | Russell Belfer <rb@github.com> | 2013-08-28 16:44:04 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2013-09-17 09:30:06 -0700 |
commit | 85d5481206a932d747b2d5587b6d4c7f69993ba6 (patch) | |
tree | a66d55c92d70668509efce5b231517467a3f8b7e /src/odb.c | |
parent | 0cf77103b218ad3622aff34f3296db1bdd5f0df9 (diff) | |
download | libgit2-85d5481206a932d747b2d5587b6d4c7f69993ba6.tar.gz |
Create public filter object and use it
This creates include/sys/filter.h with a basic definition of a
git_filter and then converts the internal code to use it. There
are related internal objects (git_filter_list) that we will want
to publish at some point, but this is a first step.
Diffstat (limited to 'src/odb.c')
-rw-r--r-- | src/odb.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -179,13 +179,13 @@ done: } int git_odb__hashfd_filtered( - git_oid *out, git_file fd, size_t size, git_otype type, git_vector *filters) + git_oid *out, git_file fd, size_t size, git_otype type, git_filter_list *fl) { int error; git_buf raw = GIT_BUF_INIT; git_buf filtered = GIT_BUF_INIT; - if (!filters || !filters->length) + if (!fl) return git_odb__hashfd(out, fd, size, type); /* size of data is used in header, so we have to read the whole file @@ -193,7 +193,7 @@ int git_odb__hashfd_filtered( */ if (!(error = git_futils_readbuffer_fd(&raw, fd, size))) - error = git_filters_apply(&filtered, &raw, filters); + error = git_filter_list_apply(&filtered, &raw, fl); git_buf_free(&raw); |