git/odb
Justin Tobler 1bfc358fd8 odb/transaction: propagate begin errors
When `odb_transaction_begin()` is invoked, the function returns the
transaction pointer directly. There is no way for the backend to
signal that it failed to set up its state, such as when creating the
temporary object directory backing the transaction.

In a subsequent commit, git-receive-pack(1) starts using ODB
transactions and needs to be able to report such failures rather
than silently ignore them. Refactor `odb_transaction_begin()` to
return an int error code and write the resulting transaction into an
out parameter. Also introduce `odb_transaction_begin_or_die()` as a
convenience for callsites that do not need to handle errors
explicitly.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2026-06-24 11:19:10 -07:00
..
source-files.c object-file: propagate files transaction errors 2026-06-24 11:19:10 -07:00
source-files.h odb/source: make `free()` function pluggable 2026-03-05 11:45:15 -08:00
source-inmemory.c odb/source-inmemory: stub out remaining functions 2026-05-15 04:50:45 +09:00
source-inmemory.h odb/source-inmemory: convert to use oidtree 2026-05-15 04:50:45 +09:00
source-loose.c odb/source-loose: drop pointer to the "files" source 2026-06-01 18:47:19 +09:00
source-loose.h odb/source-loose: drop pointer to the "files" source 2026-06-01 18:47:19 +09:00
source.c odb/source: make `free()` function pluggable 2026-03-05 11:45:15 -08:00
source.h odb/source-loose: start converting to a proper `struct odb_source` 2026-06-01 18:47:17 +09:00
streaming.c Merge branch 'ps/odb-in-memory' into ps/odb-source-loose 2026-05-21 22:34:55 +09:00
streaming.h Merge branch 'ps/odb-in-memory' into ps/odb-source-loose 2026-05-21 22:34:55 +09:00
transaction.c odb/transaction: propagate begin errors 2026-06-24 11:19:10 -07:00
transaction.h odb/transaction: propagate begin errors 2026-06-24 11:19:10 -07:00