diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-03-02 22:31:03 +0400 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-05-11 13:20:37 +0400 |
commit | 4def7035cac133607256fd91352ce54ac4548a7c (patch) | |
tree | 6956733c0ef644f9f2a6bea1e603e3fcb72fd954 /src/refdb.h | |
parent | b641c00eebb3c60e8719c0dfc55dde91ca30a5d2 (diff) |
refs: introduce an iterator
This allows us to get a list of reference names in a loop instead of callbacks.
Diffstat (limited to 'src/refdb.h')
-rw-r--r-- | src/refdb.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/refdb.h b/src/refdb.h index 047113ac8..a243f627c 100644 --- a/src/refdb.h +++ b/src/refdb.h @@ -39,6 +39,10 @@ int git_refdb_foreach_glob( git_reference_foreach_cb callback, void *payload); +int git_refdb_iterator(git_reference_iterator **out, git_refdb *db); +int git_refdb_next(const char **out, git_reference_iterator *iter); +void git_refdb_iterator_free(git_reference_iterator *iter); + int git_refdb_write(git_refdb *refdb, const git_reference *ref); int git_refdb_delete(git_refdb *refdb, const git_reference *ref); |