]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/block: create public interface for reading blocks
authorPatrick Steinhardt <ps@pks.im>
Mon, 7 Apr 2025 13:16:21 +0000 (15:16 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 7 Apr 2025 21:53:11 +0000 (14:53 -0700)
commit655e18d6b4f845090b0ba4761105b32726893ecb
treecef72db67ee133caed758f3b40f13ba451c38933
parentce76cec964ed1c8ad6c9fcee9fd833c0ec8cccf9
reftable/block: create public interface for reading blocks

While users of the reftable library wouldn't generally require access to
individual blocks in a reftable table, there are valid usecases where
one may require low-level access to them. One such upcoming usecase in
the Git codebase is to implement consistency checks for the reftable
library where we want to verify each block individually.

Create a public interface for reading blocks. The interface isn't yet
complete and lacks e.g. a way to read individual records from a block.
Such missing functionality will be backfilled in subsequent commits.

Note that this change also requires us to expose `reftable_buf`, which
is used by the `reftable_block_first_key()` function.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/basics.h
reftable/block.h
reftable/reftable-basics.h
reftable/reftable-block.h [new file with mode: 0644]