diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2021-12-23 22:29:49 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-23 23:28:34 +0300 |
commit | 0dd44584abf3fee0ba19b5edf856be2a79974228 (patch) | |
tree | f0ef0abeab44fac6db9743ca636710b52c9ae4d9 /reftable/reftable-error.h | |
parent | 019bd340820463b2ce2c006c45b6c87fefdd551c (diff) |
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 <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'reftable/reftable-error.h')
-rw-r--r-- | reftable/reftable-error.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 |