summaryrefslogtreecommitdiff
path: root/src/odb.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-08-28 16:44:04 -0700
committerRussell Belfer <rb@github.com>2013-09-17 09:30:06 -0700
commit85d5481206a932d747b2d5587b6d4c7f69993ba6 (patch)
treea66d55c92d70668509efce5b231517467a3f8b7e /src/odb.c
parent0cf77103b218ad3622aff34f3296db1bdd5f0df9 (diff)
downloadlibgit2-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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/odb.c b/src/odb.c
index a0bfec403..d9310a9d7 100644
--- a/src/odb.c
+++ b/src/odb.c
@@ -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);