Every backend's iterator must have a pointer to itself as the first element, so the API can talk to it. You'd define your iterator as
struct my_iterator { git_reference_iterator parent; ... }
and assign iter->parent.backend to your git_refdb_backend.
Free the iterator
Return the current reference and advance the iterator.
Return the name of the current reference and advance the iterator
See Implementation
Every backend's iterator must have a pointer to itself as the first element, so the API can talk to it. You'd define your iterator as
struct my_iterator { git_reference_iterator parent; ... }
and assign iter->parent.backend to your git_refdb_backend.