diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-09 09:05:19 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-12 11:40:57 +0200 |
| commit | 5880962d90958bc37c08c21d37c9da480ef20e7f (patch) | |
| tree | 2e710422d0012d078a278ff2fd2a7d410b7fa193 /include/git2/config.h | |
| parent | a319ffaead9290bfe35a0f105ff17dacaf7b6e7f (diff) | |
| download | libgit2-5880962d90958bc37c08c21d37c9da480ef20e7f.tar.gz | |
config: introduce _iterator_new()
As the name suggests, it iterates over all the entries
Diffstat (limited to 'include/git2/config.h')
| -rw-r--r-- | include/git2/config.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index b338e0c81..aed720fc8 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -453,6 +453,17 @@ GIT_EXTERN(int) git_config_foreach( void *payload); /** + * Iterate over all the config variables + * + * 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 + */ +GIT_EXTERN(int) git_config_iterator_new(git_config_iterator **out, const git_config *cfg); + +/** * Perform an operation on each config variable matching a regular expression. * * This behaviors like `git_config_foreach` with an additional filter of a |
