git/t/unit-tests
Patrick Steinhardt e837b812fe odb/streaming: consolidate read and write streams
The `struct odb_read_stream` and `struct odb_write_stream` both provide
the same functionality: they allow a caller to read object data from an
arbitrary source. Historically, the only difference was that the read
stream was used to read data out of the object database, whereas the
write stream was used to write data into the object database, but the
interfaces were mostly the same.

Over the preceding commits we have refactored the write stream to have
almost exactly the same interface as the read stream. With these
refactorings we can now easily merge those two streams into a single
interface that's used for both use cases.

While most of the changes are mechanical, there are two sites that need
special mention:

  - "builtin/unpack-objects.c" creates a write stream from compressed
    object data.

  - "odb/streaming.c" creates a write stream from a file descriptor.

Adapting these sites to yield the new stream type requires a couple more
changes. Most importantly, instead of embedding the pointer to the data
in `struct odb_write_stream`, we now allocate a structure that wraps the
new `struct odb_stream` base. Other than that though, the changes are
rather straight forward.

Some of the structures and functions are now somewhat misnamed. These
will be fixed in subsequent commits.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-05 09:42:50 -07:00
..
clar
.gitignore
generate-clar-decls.sh
generate-clar-suites.sh
lib-oid.c
lib-oid.h
lib-reftable.c reftable: split up write options 2026-06-26 08:27:19 -07:00
lib-reftable.h reftable: split up write options 2026-06-26 08:27:19 -07:00
test-lib.c
test-lib.h
u-ctype.c
u-dir.c
u-example-decorate.c
u-hash.c hash: use git_hash_init() consistently 2026-07-07 21:56:00 -07:00
u-hashmap.c
u-list-objects-filter-options.c
u-mem-pool.c
u-odb-inmemory.c odb/streaming: consolidate read and write streams 2026-08-05 09:42:50 -07:00
u-oid-array.c
u-oidmap.c
u-oidtree.c
u-prio-queue.c prio-queue: fold lazy_queue into prio_queue for automatic get+put fusion 2026-06-09 11:11:46 -07:00
u-reftable-basics.c reftable/basics: fix OOB read on binary search of empty range 2026-07-03 11:08:02 -07:00
u-reftable-block.c reftable/block: fix OOB read with bogus restart offset 2026-07-03 11:08:03 -07:00
u-reftable-merged.c reftable: split up write options 2026-06-26 08:27:19 -07:00
u-reftable-pq.c
u-reftable-readwrite.c reftable: split up write options 2026-06-26 08:27:19 -07:00
u-reftable-record.c reftable/record: don't abort when decoding invalid ref value type 2026-07-03 11:08:02 -07:00
u-reftable-stack.c reftable: split up write options 2026-06-26 08:27:19 -07:00
u-reftable-table.c Merge branch 'ps/reftable-hardening' 2026-07-19 10:42:15 -07:00
u-reftable-tree.c
u-strbuf.c
u-strcmp-offset.c
u-string-list.c
u-strvec.c
u-trailer.c
u-urlmatch-normalization.c
u-utf8-width.c
unit-test.c
unit-test.h