summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-05-06 15:24:30 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2021-05-06 15:24:30 +0100
commit5309b4654e5a387d18fe5181e376305332188eca (patch)
tree4a9d9ca6c69d5f855105a7727e503f6e05bd089f /include/git2
parent26846f4cdbaca7eac5f1030f1c2a25c8b2f8c274 (diff)
downloadlibgit2-5309b4654e5a387d18fe5181e376305332188eca.tar.gz
filter: introduce git_filter_list_apply_to_buffer
Provide a filter application mechanism that takes a user-provided string and length, instead of a `git_buf`.
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/filter.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/filter.h b/include/git2/filter.h
index 45aa6c5af..3e84877df 100644
--- a/include/git2/filter.h
+++ b/include/git2/filter.h
@@ -125,6 +125,21 @@ GIT_EXTERN(int) git_filter_list_contains(
* @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
+ * @param in_len The length of the input buffer
+ * @return 0 on success, an error code otherwise
+ */
+GIT_EXTERN(int) git_filter_list_apply_to_buffer(
+ git_buf *out,
+ git_filter_list *filters,
+ 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(