diff options
| author | Patrick Steinhardt <ps@pks.im> | 2025-04-07 15:16:28 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-04-07 14:53:13 -0700 |
| commit | e0011188ca0edc31ed861357014fd0f229d67448 (patch) | |
| tree | f398174d0a24898504f8b2c872aad3f98e6d2925 /reftable/reftable-table.h | |
| parent | 0f8ee94b636b5ab183c62b8fdd26c1611c2b86f4 (diff) | |
| download | git-e0011188ca0edc31ed861357014fd0f229d67448.tar.xz | |
reftable/table: move printing logic into test helper
The logic to print individual blocks in a table is hosted in the
reftable library. This is only the case due to historical reasons though
because users of the library had no interfaces to read blocks one by
one. Otherwise, printing individual blocks has no place in the reftable
library given that the format will not be generic in the first place.
We have now grown a public interface to iterate through blocks contained
in a table, and thus we can finally move the logic to print them into
the test helper.
Move over the logic and refactor it accordingly. Note that the iterator
also trivially allows us to access index sections, which we previously
didn't print at all. This omission wasn't intentional though, so start
dumping those sections as well so that we can assert that indices are
written as expected.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/reftable-table.h')
| -rw-r--r-- | reftable/reftable-table.h | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/reftable/reftable-table.h b/reftable/reftable-table.h index 4d61ce6cf7..5f935d02e3 100644 --- a/reftable/reftable-table.h +++ b/reftable/reftable-table.h @@ -97,9 +97,6 @@ uint64_t reftable_table_max_update_index(struct reftable_table *t); /* return the min_update_index for a table */ uint64_t reftable_table_min_update_index(struct reftable_table *t); -/* print blocks onto stdout for debugging. */ -int reftable_table_print_blocks(const char *tablename); - /* * An iterator that iterates through the blocks contained in a given table. */ |
