From 68b9605acc31d7cba3da322820b484c8db2e0a1e Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Thu, 6 May 2021 15:37:31 +0100 Subject: filter: deprecate git_filter_list_apply_to_data Deprecate `git_filter_list_apply_to_data` as it takes user input as a `git_buf`. Users should use `git_filter_list_apply_to_buffer` instead. --- include/git2/deprecated.h | 10 ++++++++++ include/git2/filter.h | 13 ------------- 2 files changed, 10 insertions(+), 13 deletions(-) (limited to 'include/git2') diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h index a51950906..ac60488ac 100644 --- a/include/git2/deprecated.h +++ b/include/git2/deprecated.h @@ -141,6 +141,16 @@ GIT_EXTERN(int) git_filter_list_stream_data( git_buf *data, git_writestream *target); +/** Deprecated in favor of `git_filter_list_apply_to_buffer`. + * + * @deprecated Use git_filter_list_apply_to_buffer + * @see Use git_filter_list_apply_to_buffer + */ +GIT_EXTERN(int) git_filter_list_apply_to_data( + git_buf *out, + git_filter_list *filters, + git_buf *in); + /**@}*/ /** @name Deprecated Tree Functions diff --git a/include/git2/filter.h b/include/git2/filter.h index 3e84877df..a0185ee88 100644 --- a/include/git2/filter.h +++ b/include/git2/filter.h @@ -134,19 +134,6 @@ GIT_EXTERN(int) git_filter_list_apply_to_buffer( const char *in, size_t in_len); -/** - * Apply filter list to a data buffer. - * - * @param out Buffer to store the result of the filtering - * @param filters A loaded git_filter_list (or NULL) - * @param in Buffer containing the data to filter - * @return 0 on success, an error code otherwise - */ -GIT_EXTERN(int) git_filter_list_apply_to_data( - git_buf *out, - git_filter_list *filters, - git_buf *in); - /** * Apply a filter list to the contents of a file on disk * -- cgit v1.2.1