Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a94d3e6

Browse files
committed
filter: add docs for streaming filters
These functions are available on the public API but don't have any documentation, so they don't appear on the API reference. Fix that.
1 parent 99090a8 commit a94d3e6

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

include/git2/filter.h

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ GIT_EXTERN(int) git_filter_list_apply_to_data(
137137
git_buf *in);
138138

139139
/**
140-
* Apply filter list to the contents of a file on disk
140+
* Apply a filter list to the contents of a file on disk
141+
*
142+
* @param out buffer into which to store the filtered file
143+
* @param filters the list of filters to apply
144+
* @param repo the repository in which to perform the filtering
145+
* @param path the path of the file to filter, a relative path will be
146+
* taken as relative to the workdir
141147
*/
142148
GIT_EXTERN(int) git_filter_list_apply_to_file(
143149
git_buf *out,
@@ -146,24 +152,51 @@ GIT_EXTERN(int) git_filter_list_apply_to_file(
146152
const char *path);
147153

148154
/**
149-
* Apply filter list to the contents of a blob
155+
* Apply a filter list to the contents of a blob
156+
*
157+
* @param out buffer into which to store the filtered file
158+
* @param filters the list of filters to apply
159+
* @param blob the blob to filter
150160
*/
151161
GIT_EXTERN(int) git_filter_list_apply_to_blob(
152162
git_buf *out,
153163
git_filter_list *filters,
154164
git_blob *blob);
155165

166+
/**
167+
* Apply a filter list to an arbitrary buffer as a stream
168+
*
169+
* @param filters the list of filters to apply
170+
* @param data the buffer to filter
171+
* @param target the stream into which the data will be written
172+
*/
156173
GIT_EXTERN(int) git_filter_list_stream_data(
157174
git_filter_list *filters,
158175
git_buf *data,
159176
git_writestream *target);
160177

178+
/**
179+
* Apply a filter list to a file as a stream
180+
*
181+
* @param filters the list of filters to apply
182+
* @param repo the repository in which to perform the filtering
183+
* @param path the path of the file to filter, a relative path will be
184+
* taken as relative to the workdir
185+
* @param target the stream into which the data will be written
186+
*/
161187
GIT_EXTERN(int) git_filter_list_stream_file(
162188
git_filter_list *filters,
163189
git_repository *repo,
164190
const char *path,
165191
git_writestream *target);
166192

193+
/**
194+
* Apply a filter list to a blob as a stream
195+
*
196+
* @param filters the list of filters to apply
197+
* @param blob the blob to filter
198+
* @param target the stream into which the data will be written
199+
*/
167200
GIT_EXTERN(int) git_filter_list_stream_blob(
168201
git_filter_list *filters,
169202
git_blob *blob,

0 commit comments

Comments
 (0)