]> git.ipfire.org Git - thirdparty/git.git/commit
reftable/merged: handle allocation failures in `merged_table_init_iter()`
authorPatrick Steinhardt <ps@pks.im>
Wed, 2 Oct 2024 10:55:54 +0000 (12:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 2 Oct 2024 14:53:53 +0000 (07:53 -0700)
commit802c0646ac3c04a16adafde5e7cf899f5fc46821
treefc6191e41a0978d6b8cc9ff0d14a38fabe46f9dd
parent74d1c18757d1a45b95e46836adf478193a34c42c
reftable/merged: handle allocation failures in `merged_table_init_iter()`

Handle allocation failures in `merged_table_init_iter()`. While at it,
merge `merged_iter_init()` into the function. It only has a single
caller and merging them makes it easier to handle allocation failures
consistently.

This change also requires us to adapt `reftable_stack_init_*_iterator()`
to bubble up the new error codes of `merged_table_iter_init()`. Adapt
callsites accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
refs/reftable-backend.c
reftable/merged.c
reftable/merged.h
reftable/reftable-merged.h
reftable/reftable-stack.h
reftable/stack.c
t/helper/test-reftable.c
t/unit-tests/t-reftable-merged.c
t/unit-tests/t-reftable-stack.c