]> git.ipfire.org Git - thirdparty/git.git/commit
reftable: add error related functionality
authorHan-Wen Nienhuys <hanwen@google.com>
Thu, 7 Oct 2021 20:24:59 +0000 (20:24 +0000)
committerJunio C Hamano <gitster@pobox.com>
Fri, 8 Oct 2021 17:45:48 +0000 (10:45 -0700)
commit890044708dcc6144aac928f3592cb8fa64ac0580
tree83c30fda2077c28ed79640ae993abef774428e57
parent27f7ed2a073c2b25f77ab9abf51e78bf7fa1a50a
reftable: add error related functionality

The reftable/ directory is structured as a library, so it cannot
crash on misuse. Instead, it returns an error code.

In addition to signaling errors, the error code can be used to signal
conditions from lower levels of the library to be handled by higher
levels of the library. For example, in a transaction we might
legitimately write an empty reftable file, but in that case, we want to
shortcut the transaction.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
reftable/error.c [new file with mode: 0644]
reftable/reftable-error.h [new file with mode: 0644]