From 0dd44584abf3fee0ba19b5edf856be2a79974228 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 23 Dec 2021 19:29:49 +0000 Subject: reftable: signal overflow reflog entries have unbounded size. In theory, each log ('g') block in reftable can have an arbitrary size, so the format allows for arbitrarily sized reflog messages. However, in the implementation, we are not scaling the log blocks up with the message, and writing a large message fails. This triggers a failure for reftable in t7006-pager.sh. Until this is fixed more structurally, report an error from within the reftable library for easier debugging. Signed-off-by: Han-Wen Nienhuys Signed-off-by: Junio C Hamano --- reftable/reftable-error.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'reftable/reftable-error.h') diff --git a/reftable/reftable-error.h b/reftable/reftable-error.h index 6f89bedf1a..4c457aaaf8 100644 --- a/reftable/reftable-error.h +++ b/reftable/reftable-error.h @@ -53,6 +53,10 @@ enum reftable_error { /* Invalid ref name. */ REFTABLE_REFNAME_ERROR = -10, + + /* Entry does not fit. This can happen when writing outsize reflog + messages. */ + REFTABLE_ENTRY_TOO_BIG_ERROR = -11, }; /* convert the numeric error code to a string. The string should not be -- cgit v1.3