]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/reader: unify indexed and linear seeking
authorPatrick Steinhardt <ps@pks.im>
Mon, 13 May 2024 08:47:11 +0000 (10:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 May 2024 00:04:16 +0000 (17:04 -0700)
commitdfdd1455bbb2eed6674964000d037cd213687a33
tree3f188fac8c19914a1f2b17d2c2fbbae0e17db288
parent9a59b65dba0820671753f636e9417bfd63ea20c1
reftable/reader: unify indexed and linear seeking

In `reader_seek_internal()` we either end up doing an indexed seek when
there is one or a linear seek otherwise. These two code paths are
disjunct without a good reason, where the indexed seek will cause us to
exit early.

Refactor the two code paths such that it becomes possible to share a bit
more code between them.

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