summaryrefslogtreecommitdiff
path: root/include/git2/config.h
diff options
context:
space:
mode:
authorCarlos Martín Nieto <carlos@cmartin.tk>2012-02-04 23:18:30 +0100
committerCarlos Martín Nieto <carlos@cmartin.tk>2012-02-17 19:43:43 +0100
commit5e0dc4af013e23d0cbc737d8ab2756aaf38e1516 (patch)
treeb6b8aaf99d7775bb177ca5f429a7677965fb6ba5 /include/git2/config.h
parent78d65f390f031d18ce698a24e1f83b99cc8cf699 (diff)
downloadlibgit2-5e0dc4af013e23d0cbc737d8ab2756aaf38e1516.tar.gz
Support getting multivars
Diffstat (limited to 'include/git2/config.h')
-rw-r--r--include/git2/config.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h
index afa661fc5..1f037c8ee 100644
--- a/include/git2/config.h
+++ b/include/git2/config.h
@@ -29,6 +29,7 @@ struct git_config_file {
/* Open means open the file/database and parse if necessary */
int (*open)(struct git_config_file *);
int (*get)(struct git_config_file *, const char *key, const char **value);
+ int (*get_multivar)(struct git_config_file *, const char *key, const char *regexp, int (*fn)(const char *, void *), void *data);
int (*set)(struct git_config_file *, const char *key, const char *value);
int (*del)(struct git_config_file *, const char *key);
int (*foreach)(struct git_config_file *, int (*fn)(const char *, const char *, void *), void *data);
@@ -206,6 +207,12 @@ GIT_EXTERN(int) git_config_get_bool(git_config *cfg, const char *name, int *out)
GIT_EXTERN(int) git_config_get_string(git_config *cfg, const char *name, const char **out);
/**
+ * Get each value of a multivar. The callback will be called on each
+ * variable found
+ */
+GIT_EXTERN(int) git_config_get_multivar(git_config *cfg, const char *name, const char *regexp, int (*fn)(const char *, void *), void *data);
+
+/**
* Set the value of an integer config variable.
*
* @param cfg where to look for the variable