summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-01-06 11:49:00 +0000
committerGitHub <noreply@github.com>2021-01-06 11:49:00 +0000
commit27e34f9b9843f7bcc33a4ccfe3e395fe303cba63 (patch)
tree0f2bbf08b7def90fdf7f6785936f8632ae1e151a /include/git2
parentf0d7922c9bafff38e12978625f467aafebe75145 (diff)
parentddafbafef54677c3466260e52b135d5dff832624 (diff)
downloadlibgit2-master.tar.gz
Merge pull request #5759 from JoshuaS3/mastermaster
Add documentation for git_blob_filter_options.version
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/blob.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/git2/blob.h b/include/git2/blob.h
index 8e977267d..741b28f4c 100644
--- a/include/git2/blob.h
+++ b/include/git2/blob.h
@@ -118,6 +118,10 @@ typedef enum {
/**
* The options used when applying filter options to a file.
+ *
+ * Initialize with `GIT_BLOB_FILTER_OPTIONS_INIT`. Alternatively, you can
+ * use `git_blob_filter_options_init`.
+ *
*/
typedef struct {
int version;
@@ -130,6 +134,18 @@ typedef struct {
#define GIT_BLOB_FILTER_OPTIONS_INIT {GIT_BLOB_FILTER_OPTIONS_VERSION, GIT_BLOB_FILTER_CHECK_FOR_BINARY}
/**
+ * Initialize git_blob_filter_options structure
+ *
+ * Initializes a `git_blob_filter_options` with default values. Equivalent
+ * to creating an instance with `GIT_BLOB_FILTER_OPTIONS_INIT`.
+ *
+ * @param opts The `git_blob_filter_options` struct to initialize.
+ * @param version The struct version; pass `GIT_BLOB_FILTER_OPTIONS_VERSION`.
+ * @return Zero on success; -1 on failure.
+ */
+GIT_EXTERN(int) git_blob_filter_options_init(git_blob_filter_options *opts, unsigned int version);
+
+/**
* Get a buffer with the filtered content of a blob.
*
* This applies filters as if the blob was being checked out to the