]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/reader: make table iterator reseekable
authorPatrick Steinhardt <ps@pks.im>
Mon, 16 Sep 2024 08:50:14 +0000 (10:50 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 16 Sep 2024 20:57:19 +0000 (13:57 -0700)
commit0a148a8eda7da6f7ff039ff2ea62b143ceb57f2f
tree8ce4cb160a71f50db37077327bd54295c129cabd
parenta4f50bb1e9b6840bb4583ac4bc6d93bea9704879
reftable/reader: make table iterator reseekable

In 67ce50ba26 (Merge branch 'ps/reftable-reusable-iterator', 2024-05-30)
we have refactored the interface of reftable iterators such that they
can be reused in theory. This patch series only landed the required
changes on the interface level, but didn't yet implement the actual
logic to make iterators reusable.

As it turns out almost all of the infrastructure already does support
re-seeking. The only exception is the table iterator, which does not
reset its `is_finished` bit. Do so and add a couple of tests that verify
that we can re-seek iterators.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Makefile
reftable/reader.c
t/unit-tests/t-reftable-merged.c
t/unit-tests/t-reftable-reader.c [new file with mode: 0644]