diff options
author | Carlos Martín Nieto <cmn@dwim.me> | 2013-05-04 16:32:58 +0200 |
---|---|---|
committer | Carlos Martín Nieto <cmn@dwim.me> | 2013-05-11 11:20:38 +0200 |
commit | 2b562c3a1edf0f521bdb7adf23e524d5a8389b15 (patch) | |
tree | a5ac3a5b361eb21fbcf77fb4c05ce574ab194c65 /include/git2/sys/refdb_backend.h | |
parent | 95727245fd4f08aa77d1077901976ab3bd7472e1 (diff) | |
download | libgit2-2b562c3a1edf0f521bdb7adf23e524d5a8389b15.tar.gz |
refs: remove the OID/SYMBOLIC filtering
Nobody should ever be using anything other than ALL at this level, so
remove the option altogether.
As part of this, git_reference_foreach_glob is now implemented in the
frontend using an iterator. Backends will later regain the ability of
doing the glob filtering in the backend.
Diffstat (limited to 'include/git2/sys/refdb_backend.h')
-rw-r--r-- | include/git2/sys/refdb_backend.h | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/include/git2/sys/refdb_backend.h b/include/git2/sys/refdb_backend.h index 4c882b5cd..f5eacd105 100644 --- a/include/git2/sys/refdb_backend.h +++ b/include/git2/sys/refdb_backend.h @@ -59,30 +59,9 @@ struct git_refdb_backend { const char *ref_name); /** - * Enumerates each reference in the refdb. A refdb implementation must - * provide this function. - */ - int (*foreach)( - git_refdb_backend *backend, - unsigned int list_flags, - git_reference_foreach_cb callback, - void *payload); - - /** - * Enumerates each reference in the refdb that matches the given - * glob string. A refdb implementation may provide this function; - * if it is not provided, foreach will be used and the results filtered - * against the glob. - */ - int (*foreach_glob)( - git_refdb_backend *backend, - const char *glob, - unsigned int list_flags, - git_reference_foreach_cb callback, - void *payload); - - /** - * Allocate an iterator object for the backend + * Allocate an iterator object for the backend. + * + * A refdb implementation must provide this function. */ int (*iterator)( git_reference_iterator **iter, @@ -90,6 +69,8 @@ struct git_refdb_backend { /** * Return the current value and advance the iterator. + * + * A refdb implementation must provide this function. */ int (*next)( const char **name, @@ -97,6 +78,8 @@ struct git_refdb_backend { /** * Free the iterator + * + * A refdb implementation must provide this function. */ void (*iterator_free)( git_reference_iterator *iter); |