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/diff.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/diff.c')
-rw-r--r-- | src/diff.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/diff.c b/src/diff.c index 77dbbd8bc..b1cde36bc 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, 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: |