diff options
Diffstat (limited to 'src/filter.h')
-rw-r--r-- | src/filter.h | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/src/filter.h b/src/filter.h index 241791276..58cb4b424 100644 --- a/src/filter.h +++ b/src/filter.h @@ -19,7 +19,7 @@ typedef struct { git_filter_options options; git_attr_session *attr_session; - git_buf *temp_buf; + git_str *temp_buf; } git_filter_session; #define GIT_FILTER_SESSION_INIT {GIT_FILTER_OPTIONS_INIT, 0} @@ -36,14 +36,35 @@ extern int git_filter_list__load( git_filter_mode_t mode, git_filter_session *filter_session); +int git_filter_list__apply_to_buffer( + git_str *out, + git_filter_list *filters, + const char *in, + size_t in_len); +int git_filter_list__apply_to_file( + git_str *out, + git_filter_list *filters, + git_repository *repo, + const char *path); +int git_filter_list__apply_to_blob( + git_str *out, + git_filter_list *filters, + git_blob *blob); + /* * The given input buffer will be converted to the given output buffer. * The input buffer will be freed (_if_ it was allocated). */ extern int git_filter_list__convert_buf( - git_buf *out, + git_str *out, + git_filter_list *filters, + git_str *in); + +extern int git_filter_list__apply_to_file( + git_str *out, git_filter_list *filters, - git_buf *in); + git_repository *repo, + const char *path); /* * Available filters @@ -55,8 +76,8 @@ extern git_filter *git_ident_filter_new(void); extern int git_filter_buffered_stream_new( git_writestream **out, git_filter *filter, - int (*write_fn)(git_filter *, void **, git_buf *, const git_buf *, const git_filter_source *), - git_buf *temp_buf, + int (*write_fn)(git_filter *, void **, git_str *, const git_str *, const git_filter_source *), + git_str *temp_buf, void **payload, const git_filter_source *source, git_writestream *target); |