]> git.ipfire.org Git - thirdparty/git.git/commit
refs/iterator: implement seeking for packed-ref iterators
authorPatrick Steinhardt <ps@pks.im>
Wed, 12 Mar 2025 15:56:20 +0000 (16:56 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 12 Mar 2025 18:31:20 +0000 (11:31 -0700)
commit22600c045298f4f3664f94f6cbbf337903c72e82
tree684ddf185df5edc0d3ca04b672ac738a3b21a26c
parent84e656919cb7237f1b11a948974d0591d9d3434f
refs/iterator: implement seeking for packed-ref iterators

Implement seeking of `packed-ref` iterators. The implementation is again
straight forward, except that we cannot continue to use the prefix
iterator as we would otherwise not be able to reseek the iterator
anymore in case one first asks for an empty and then for a non-empty
prefix. Instead, we open-code the logic to in `advance()`.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/packed-backend.c