git/t/unit-tests
Patrick Steinhardt 63a3257352 odb/source: allow `read_object_info()` to bubble up error messages
When reading an object fails even though it exists, the sources know
best what exactly went wrong and where the corrupt object is located.
This information is lost though when bubbling up the error to the object
database layer, which forces that layer to reconstruct it after the
fact. This is exactly what `do_oid_object_info_extended()` does via
`has_packed_and_bad()`, but that function only really knows to handle
the "files" backend by reaching into its internals.

Introduce a new `errmsg` parameter for the `read_object_info()` callback
that sources are expected to populate with a human-readable message in
case reading the object has failed. Adapt the packed and loose sources
to populate the buffer with the messages that we ultimately want to
surface to the user.

For now, all callers are adapted to pass a `NULL` pointer. We will add a
user of this new infrastructure in a subsequent commit.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-08-19 10:23:02 -07:00
..
clar doc: fix typos via codespell 2026-06-08 00:21:35 +09:00
.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/source: allow `read_object_info()` to bubble up error messages 2026-08-19 10:23:02 -07:00
u-oid-array.c
u-oidmap.c
u-oidtree.c oidtree: add ability to store data 2026-05-15 04:50:45 +09:00
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