]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/reader: separate concerns of table iter and reftable reader
authorPatrick Steinhardt <ps@pks.im>
Mon, 13 May 2024 08:47:16 +0000 (10:47 +0200)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 May 2024 00:04:17 +0000 (17:04 -0700)
commit81a03a323664d3d14a25e2ef8b29fe52dcef2126
treeaa69aa5758b09adea15169e2394fd16fa98978c0
parentdfdd1455bbb2eed6674964000d037cd213687a33
reftable/reader: separate concerns of table iter and reftable reader

In "reftable/reader.c" we implement two different interfaces:

  - The reftable reader contains the logic to read reftables.

  - The table iterator is used to iterate through a single reftable read
    by the reader.

The way those two types are used in the code is somewhat confusing
though because seeking inside a table is implemented as if it was part
of the reftable reader, even though it is ultimately more of a detail
implemented by the table iterator.

Make the boundary between those two types clearer by renaming functions
that seek records in a table such that they clearly belong to the table
iterator's logic.

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