diff options
author | Patrick Steinhardt <ps@pks.im> | 2025-02-18 10:20:43 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2025-02-18 10:55:36 -0800 |
commit | 445f9f4f35c663fb668425f8c8fe0a1d58e1d8c7 (patch) | |
tree | 9b3500077174934096236cfea832306cde914485 /builtin/commit-graph.c | |
parent | 6f6127decde6785b9ba5f22a07a7754d1fda1a59 (diff) |
reftable: stop using `BUG()` in trivial cases
Stop using `BUG()` in the remaining trivial cases that we still have in
the reftable library. Instead of aborting the program, we'll now bubble
up a `REFTABLE_API_ERROR` to indicate misuse of the calling conventions.
Note that in both `reftable_reader_{inc,dec}ref()` we simply stop
calling `BUG()` altogether. The only situation where the counter should
be zero is when the structure has already been free'd anyway, so we
would run into undefined behaviour regardless of whether we try to abort
the program or not.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/commit-graph.c')
0 files changed, 0 insertions, 0 deletions