summaryrefslogtreecommitdiff
path: root/include/git2/config.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2013-08-08 17:57:59 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2013-08-08 20:38:42 +0200
commit99dfb538addc06c2f40d29371c52dd43f0d6ceb1 (patch)
tree510b54d1c86f58ebb48caadb455e9c7c20a919d2 /include/git2/config.h
parentcca5df6376fd41fb4fbbb9f8a9ff87c38079dfd5 (diff)
downloadlibgit2-99dfb538addc06c2f40d29371c52dd43f0d6ceb1.tar.gz
config: working multivar iterator
Implement the foreach version as a wrapper around the iterator.
Diffstat (limited to 'include/git2/config.h')
-rw-r--r--include/git2/config.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h
index 950312548..e1d34b997 100644
--- a/include/git2/config.h
+++ b/include/git2/config.h
@@ -342,6 +342,16 @@ GIT_EXTERN(int) git_config_get_string(const char **out, const git_config *cfg, c
GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload);
/**
+ * Get each value of a multivar
+ *
+ * @param out pointer to store the iterator
+ * @param cfg where to look for the variable
+ * @param name the variable's name
+ * @param regexp regular expression to filter which variables we're
+ * interested in. Use NULL to indicate all
+ */
+GIT_EXTERN(int) git_config_get_multivar(git_config_iterator **out, const git_config *cfg, const char *name, const char *regexp);
+/**
* Set the value of an integer config variable in the config file
* with the highest level (usually the local one).
*