git/reftable
Patrick Steinhardt 51afc709dc reftable/tree: handle allocation failures
The tree interfaces of the reftable library handle both insertion and
searching of tree nodes with a single function, where the behaviour is
altered between the two via an `insert` bit. This makes it quit awkward
to handle allocation failures because on inserting we'd have to check
for `NULL` pointers and return an error, whereas on searching entries we
don't have to handle it as an allocation error.

Split up concerns of this function into two separate functions, one for
inserting entries and one for searching entries. This makes it easy for
us to check for allocation errors as `tree_insert()` should never return
a `NULL` pointer now. Adapt callers accordingly.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2024-10-02 07:53:55 -07:00
..
LICENSE
basics.c reftable/basics: handle allocation failures in `parse_names()` 2024-10-02 07:53:51 -07:00
basics.h reftable/basics: handle allocation failures in `parse_names()` 2024-10-02 07:53:51 -07:00
block.c reftable/block: handle allocation failures 2024-10-02 07:53:55 -07:00
block.h reftable/block: handle allocation failures 2024-10-02 07:53:55 -07:00
blocksource.c reftable/blocksource: handle allocation failures 2024-10-02 07:53:54 -07:00
blocksource.h reftable/blocksource: drop malloc block source 2024-08-23 08:04:46 -07:00
constants.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
error.c reftable/error: introduce out-of-memory error code 2024-10-02 07:53:50 -07:00
iter.c reftable/iter: handle allocation failures when creating indexed table iter 2024-10-02 07:53:54 -07:00
iter.h reftable/iter: handle allocation failures when creating indexed table iter 2024-10-02 07:53:54 -07:00
merged.c reftable/pq: handle allocation failures when adding entries 2024-10-02 07:53:55 -07:00
merged.h reftable/merged: handle allocation failures in `merged_table_init_iter()` 2024-10-02 07:53:53 -07:00
pq.c reftable/pq: handle allocation failures when adding entries 2024-10-02 07:53:55 -07:00
pq.h reftable/pq: handle allocation failures when adding entries 2024-10-02 07:53:55 -07:00
reader.c reftable/iter: handle allocation failures when creating indexed table iter 2024-10-02 07:53:54 -07:00
reader.h reftable/reader: handle allocation failures in `reader_init_iter()` 2024-10-02 07:53:53 -07:00
record.c reftable/record: handle allocation failures when decoding records 2024-10-02 07:53:52 -07:00
record.h reftable/record: handle allocation failures on copy 2024-10-02 07:53:52 -07:00
reftable-basics.h reftable/basics: merge "publicbasics" into "basics" 2024-10-02 07:53:51 -07:00
reftable-blocksource.h
reftable-error.h reftable/error: introduce out-of-memory error code 2024-10-02 07:53:50 -07:00
reftable-iterator.h reftable/generic: adapt interface to allow reuse of iterators 2024-05-13 17:04:18 -07:00
reftable-merged.h reftable/merged: handle allocation failures in `merged_table_init_iter()` 2024-10-02 07:53:53 -07:00
reftable-reader.h reftable/reader: handle allocation failures in `reader_init_iter()` 2024-10-02 07:53:53 -07:00
reftable-record.h t/helper: inline printing of reftable records 2024-08-22 07:59:47 -07:00
reftable-stack.h reftable/merged: handle allocation failures in `merged_table_init_iter()` 2024-10-02 07:53:53 -07:00
reftable-writer.h reftable/writer: handle allocation failures in `reftable_new_writer()` 2024-10-02 07:53:52 -07:00
stack.c reftable/stack: handle allocation failures in auto compaction 2024-10-02 07:53:54 -07:00
stack.h reftable: make the compaction factor configurable 2024-05-13 17:02:39 -07:00
system.h hash-ll: merge with "hash.h" 2024-06-14 10:26:33 -07:00
tree.c reftable/tree: handle allocation failures 2024-10-02 07:53:55 -07:00
tree.h reftable/tree: handle allocation failures 2024-10-02 07:53:55 -07:00
writer.c reftable/tree: handle allocation failures 2024-10-02 07:53:55 -07:00
writer.h