summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-09-14 07:45:50 -0400
committerGitHub <noreply@github.com>2021-09-14 07:45:50 -0400
commit4f24a932f098c011a229c370f76eda11db3e4b4c (patch)
treeecd99bd277f7bf86e578a940335d8a4248b28e42 /include/git2
parent5bd49aeeeb7a69f85249b970ac4e2c7011b7127d (diff)
parenta24e656a4e6278157d2aec885e0d300f47f74938 (diff)
downloadlibgit2-4f24a932f098c011a229c370f76eda11db3e4b4c.tar.gz
Merge pull request #6031 from libgit2/ethomson/extensions
Support custom git extensions
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/common.h20
1 files changed, 19 insertions, 1 deletions
diff --git a/include/git2/common.h b/include/git2/common.h
index d278c01b6..2ee829025 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -209,7 +209,9 @@ typedef enum {
GIT_OPT_GET_MWINDOW_FILE_LIMIT,
GIT_OPT_SET_MWINDOW_FILE_LIMIT,
GIT_OPT_SET_ODB_PACKED_PRIORITY,
- GIT_OPT_SET_ODB_LOOSE_PRIORITY
+ GIT_OPT_SET_ODB_LOOSE_PRIORITY,
+ GIT_OPT_GET_EXTENSIONS,
+ GIT_OPT_SET_EXTENSIONS
} git_libgit2_opt_t;
/**
@@ -431,6 +433,22 @@ typedef enum {
* > Override the default priority of the loose ODB backend which
* > is added when default backends are assigned to a repository
*
+ * opts(GIT_OPT_GET_EXTENSIONS, git_strarray *out)
+ * > Returns the list of git extensions that are supported. This
+ * > is the list of built-in extensions supported by libgit2 and
+ * > custom extensions that have been added with
+ * > `GIT_OPT_SET_EXTENSIONS`. Extensions that have been negated
+ * > will not be returned. The returned list should be released
+ * > with `git_strarray_dispose`.
+ *
+ * opts(GIT_OPT_SET_EXTENSIONS, const char **extensions, size_t len)
+ * > Set that the given git extensions are supported by the caller.
+ * > Extensions supported by libgit2 may be negated by prefixing
+ * > them with a `!`. For example: setting extensions to
+ * > { "!noop", "newext" } indicates that the caller does not want
+ * > to support repositories with the `noop` extension but does want
+ * > to support repositories with the `newext` extension.
+ *
* @param option Option key
* @param ... value to set the option
* @return 0 on success, <0 on failure