summaryrefslogtreecommitdiff
path: root/src/diff.c
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-09-17 09:57:55 -0700
committerVicent Martí <vicent@github.com>2013-09-17 09:57:55 -0700
commitbb371b62e950e3307d3acf2f772495a60565d266 (patch)
treeb4479ec3ad261bcac13493ee3f5ad45d15dfdda2 /src/diff.c
parent4581f9d8ab72e9b97817e1eaa7154bcec1c7f0b1 (diff)
parentf60ed4e6495b8bf68d0604335672e6f300330b3b (diff)
downloadlibgit2-bb371b62e950e3307d3acf2f772495a60565d266.tar.gz
Merge pull request #1847 from libgit2/filters-alternative
Alternative proposal for filter API
Diffstat (limited to 'src/diff.c')
-rw-r--r--src/diff.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/diff.c b/src/diff.c
index 77dbbd8bc..4d9ace183 100644
--- a/src/diff.c
+++ b/src/diff.c
@@ -568,21 +568,21 @@ int git_diff__oid_for_file(
giterr_set(GITERR_OS, "File size overflow (for 32-bits) on '%s'", path);
result = -1;
} else {
- git_vector filters = GIT_VECTOR_INIT;
+ git_filter_list *fl = NULL;
- result = git_filters_load(&filters, repo, path, GIT_FILTER_TO_ODB);
- if (result >= 0) {
+ result = git_filter_list_load(&fl, repo, NULL, path, GIT_FILTER_TO_ODB);
+ if (!result) {
int fd = git_futils_open_ro(full_path.ptr);
if (fd < 0)
result = fd;
else {
result = git_odb__hashfd_filtered(
- oid, fd, (size_t)size, GIT_OBJ_BLOB, &filters);
+ oid, fd, (size_t)size, GIT_OBJ_BLOB, fl);
p_close(fd);
}
- }
- git_filters_free(&filters);
+ git_filter_list_free(fl);
+ }
}
cleanup: