diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-08 20:47:06 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-08-08 20:47:06 +0200 |
| commit | 1e96c9d5341e5f2b0e1af9a1088cc30d3ffb9a01 (patch) | |
| tree | 83117a8715e3a412bcc284891ce26c6de939f903 /include/git2/config.h | |
| parent | 99dfb538addc06c2f40d29371c52dd43f0d6ceb1 (diff) | |
| download | libgit2-1e96c9d5341e5f2b0e1af9a1088cc30d3ffb9a01.tar.gz | |
config: add _next() and _iterator_free()
Make it look like the refs iterator API.
Diffstat (limited to 'include/git2/config.h')
| -rw-r--r-- | include/git2/config.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/git2/config.h b/include/git2/config.h index e1d34b997..b338e0c81 100644 --- a/include/git2/config.h +++ b/include/git2/config.h @@ -351,6 +351,23 @@ GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const cha * 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); + +/** + * Return the current entry and advance the iterator + * + * @param entry pointer to store the entry + * @param iter the iterator + * @return 0 or an error code. GIT_ITEROVER if the iteration has completed + */ +GIT_EXTERN(int) git_config_next(git_config_entry **entry, git_config_iterator *iter); + +/** + * Free a config iterator + * + * @param iter the iterator to free + */ +GIT_EXTERN(void) git_config_iterator_free(git_config_iterator *iter); + /** * Set the value of an integer config variable in the config file * with the highest level (usually the local one). |
