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>2021-12-23 22:29:49 +0300
committerJunio C Hamano <gitster@pobox.com>2021-12-23 23:28:34 +0300
commit0dd44584abf3fee0ba19b5edf856be2a79974228 (patch)
treef0ef0abeab44fac6db9743ca636710b52c9ae4d9 /reftable/error.c
parent019bd340820463b2ce2c006c45b6c87fefdd551c (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/error.c')
-rw-r--r--reftable/error.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/reftable/error.c b/reftable/error.c
index f6f16def92..93941f2145 100644
--- a/reftable/error.c
+++ b/reftable/error.c
@@ -32,6 +32,8 @@ const char *reftable_error_str(int err)
return "wrote empty table";
case REFTABLE_REFNAME_ERROR:
return "invalid refname";
+ case REFTABLE_ENTRY_TOO_BIG_ERROR:
+ return "entry too large";
case -1:
return "general error";
default: