reftable: signal overflow
commit0dd44584abf3fee0ba19b5edf856be2a79974228
authorHan-Wen Nienhuys <hanwen@google.com>
Thu, 23 Dec 2021 19:29:49 +0000 (23 19:29 +0000)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Dec 2021 20:28:34 +0000 (23 12:28 -0800)
treef0ef0abeab44fac6db9743ca636710b52c9ae4d9
parent019bd340820463b2ce2c006c45b6c87fefdd551c
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>
reftable/error.c
reftable/readwrite_test.c
reftable/reftable-error.h
reftable/writer.c