From 5880962d90958bc37c08c21d37c9da480ef20e7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Fri, 9 Aug 2013 09:05:19 +0200 Subject: config: introduce _iterator_new() As the name suggests, it iterates over all the entries --- include/git2/config.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/git2/config.h') 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 @@ -452,6 +452,17 @@ GIT_EXTERN(int) git_config_foreach( git_config_foreach_cb callback, 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. * -- cgit v1.2.1