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>
This commit is contained in:

committed by
Junio C Hamano

parent
019bd34082
commit
0dd44584ab
@ -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
|
||||
|
Reference in New Issue
Block a user