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/repository.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/repository.c')
-rw-r--r-- | src/repository.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/repository.c b/src/repository.c index eead41201..94700e4e3 100644 --- a/src/repository.c +++ b/src/repository.c @@ -1649,7 +1649,7 @@ int git_repository_hashfile( const char *as_path) { int error; - git_vector filters = GIT_VECTOR_INIT; + git_filter_list *fl = NULL; git_file fd = -1; git_off_t len; git_buf full_path = GIT_BUF_INIT; @@ -1671,7 +1671,7 @@ int git_repository_hashfile( /* passing empty string for "as_path" indicated --no-filters */ if (strlen(as_path) > 0) { - error = git_filters_load(&filters, repo, as_path, GIT_FILTER_TO_ODB); + error = git_filter_list_load(&fl, repo, as_path, GIT_FILTER_TO_ODB); if (error < 0) return error; } else { @@ -1698,12 +1698,12 @@ int git_repository_hashfile( goto cleanup; } - error = git_odb__hashfd_filtered(out, fd, (size_t)len, type, &filters); + error = git_odb__hashfd_filtered(out, fd, (size_t)len, type, fl); cleanup: if (fd >= 0) p_close(fd); - git_filters_free(&filters); + git_filter_list_free(fl); git_buf_free(&full_path); return error; |