diff options
author | Vicent Marti <tanoku@gmail.com> | 2013-05-29 22:47:37 +0200 |
---|---|---|
committer | Vicent Marti <tanoku@gmail.com> | 2013-05-29 22:47:37 +0200 |
commit | ec24e542969f9d49e41e4c2cb3eac2259b1818c2 (patch) | |
tree | fd201dedeabda91e8a0e63b27eeb24093a759988 /include/git2/sys/refdb_backend.h | |
parent | 56960b8396d3aef0b39f32aa7a9749202f925ada (diff) | |
download | libgit2-ec24e542969f9d49e41e4c2cb3eac2259b1818c2.tar.gz |
What are the chances, really
Diffstat (limited to 'include/git2/sys/refdb_backend.h')
-rw-r--r-- | include/git2/sys/refdb_backend.h | 49 |
1 files changed, 21 insertions, 28 deletions
diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h index 0820cd9c5..a78d22658 100644 --- a/include/git2/sys/refdb_backend.h +++ b/include/git2/sys/refdb_backend.h @@ -33,8 +33,27 @@ GIT_BEGIN_DECL * and assign `iter->parent.backend` to your `git_refdb_backend`. */ struct git_reference_iterator { - git_refdb_backend *backend; - char *glob; + git_refdb *db; + + /** + * Return the current reference and advance the iterator. + */ + int (*next)( + git_reference **ref, + git_reference_iterator *iter); + + /** + * Return the name of the current reference and advance the iterator + */ + int (*next_name)( + const char **ref_name, + git_reference_iterator *iter); + + /** + * Free the iterator + */ + void (*free)( + git_reference_iterator *iter); }; /** An instance for a custom backend */ @@ -66,35 +85,9 @@ struct git_refdb_backend { */ int (*iterator)( git_reference_iterator **iter, - struct git_refdb_backend *backend); - - /** - * Allocate a glob-filtering iterator object for the backend. - * - * A refdb implementation may provide this function. If it's - * not available, the glob matching will be done by the frontend. - */ - int (*iterator_glob)( - git_reference_iterator **iter, struct git_refdb_backend *backend, const char *glob); - /** - * Return the current value and advance the iterator. - * - * A refdb implementation must provide this function. - */ - int (*next)( - git_reference **ref, - git_reference_iterator *iter); - - /** - * Free the iterator - * - * A refdb implementation must provide this function. - */ - void (*iterator_free)( - git_reference_iterator *iter); /* * Writes the given reference to the refdb. A refdb implementation * must provide this function. |