Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2022-01-20 18:12:14 +0300
committerJunio C Hamano <gitster@pobox.com>2022-01-20 22:31:53 +0300
commit01033de49f26b75afd1e868d56c332c60b141faa (patch)
tree7cea687a208d1b6efa3f0b64b01e4bd16257894f /reftable/record.h
parent66c0dabab5e15f78d0505be36cac4a383e14cf88 (diff)
reftable: add print functions to the record types
This isn't used per se, but it is useful for debugging, especially Windows CI failures. Signed-off-by: Han-Wen Nienhuys <hanwen@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/record.h')
-rw-r--r--reftable/record.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/reftable/record.h b/reftable/record.h
index 010a322e90..fd80cd451d 100644
--- a/reftable/record.h
+++ b/reftable/record.h
@@ -61,6 +61,9 @@ struct reftable_record_vtable {
/* Are two records equal? This assumes they have the same type. Returns 0 for non-equal. */
int (*equal)(const void *a, const void *b, int hash_size);
+
+ /* Print on stdout, for debugging. */
+ void (*print)(const void *rec, int hash_size);
};
/* returns true for recognized block types. Block start with the block type. */
@@ -112,6 +115,7 @@ struct reftable_record {
/* see struct record_vtable */
int reftable_record_equal(struct reftable_record *a, struct reftable_record *b, int hash_size);
+void reftable_record_print(struct reftable_record *rec, int hash_size);
void reftable_record_key(struct reftable_record *rec, struct strbuf *dest);
uint8_t reftable_record_type(struct reftable_record *rec);
void reftable_record_copy_from(struct reftable_record *rec,