]> git.ipfire.org Git - thirdparty/git.git/commit
refs: expose `ref_iterator` via 'refs.h'
authorKarthik Nayak <karthik.188@gmail.com>
Tue, 15 Jul 2025 11:28:26 +0000 (13:28 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 15 Jul 2025 18:54:19 +0000 (11:54 -0700)
commit6bde5d43b769509141d7ebc0b2476bc2035bc673
tree04dd093da3df9b1d702cf129ec9f48fa4c424507
parent16bd9f20a403117f2e0d9bcda6c6e621d3763e77
refs: expose `ref_iterator` via 'refs.h'

The `ref_iterator` is an internal structure to the 'refs/'
sub-directory, which allows iteration over refs. All reference iteration
is built on top of these iterators.

External clients of the 'refs' subsystem use the various
'refs_for_each...()' functions to iterate over refs. However since these
are wrapper functions, each combination of functionality requires a new
wrapper function. This is not feasible as the functions pile up with the
increase in requirements. Expose the internal reference iterator, so
advanced users can mix and match options as needed.

Signed-off-by: Karthik Nayak <karthik.188@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs.h
refs/refs-internal.h