diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-09 10:29:11 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-12 11:40:57 +0200 |
| commit | 54f3a572b4fac419008afa83da56c1b0daee1257 (patch) | |
| tree | 5a89bdbb596c65128646b42b02a17096beadafae /include/git2/config.h | |
| parent | 5880962d90958bc37c08c21d37c9da480ef20e7f (diff) | |
| download | libgit2-54f3a572b4fac419008afa83da56c1b0daee1257.tar.gz | |
config: introduce a regex-filtering iterator
Diffstat (limited to 'include/git2/config.h')
| -rw-r--r-- | include/git2/config.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index aed720fc8..28216467b 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -464,6 +464,18 @@ GIT_EXTERN(int) git_config_foreach( GIT_EXTERN(int) git_config_iterator_new(git_config_iterator **out, const git_config *cfg); /** + * Iterate over all the config variables whose name matches a pattern + * + * Use `git_config_next` to advance the iteration and + * `git_config_iterator_free` when done. + * + * @param out pointer to store the iterator + * @param cfg where to ge the variables from + * @param regexp regular expression to match the names + */ +GIT_EXTERN(int) git_config_iterator_glob_new(git_config_iterator **out, const git_config *cfg, const char *regexp); + +/** * Perform an operation on each config variable matching a regular expression. * * This behaviors like `git_config_foreach` with an additional filter of a |
