]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/reader: set up the reader when initializing table iterator
authorPatrick Steinhardt <ps@pks.im>
Mon, 13 May 2024 08:47:26 +0000 (10:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 May 2024 00:04:17 +0000 (17:04 -0700)
commitc82692f75591b320fbe5f4d2018505bd902f95e6
treef7ae31c71ef388e4edc5469b85aa0b0dd1cba4bb
parentf1e3c12196b6c91086b58495499db0f4802fa5d1
reftable/reader: set up the reader when initializing table iterator

All the seeking functions accept a `struct reftable_reader` as input
such that they can use the reader to look up the respective blocks.
Refactor the code to instead set up the reader as a member of `struct
table_iter` during initialization such that we don't have to pass the
reader on every single call.

This step is required to move seeking of records into the generic
`struct reftable_iterator` infrastructure.

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