]> git.ipfire.org Git - thirdparty/git.git/commit
odb: add transaction interface
authorJustin Tobler <jltobler@gmail.com>
Tue, 16 Sep 2025 18:29:38 +0000 (13:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Sep 2025 18:37:06 +0000 (11:37 -0700)
commitce1661f9da70ea2ffcb54f7b544410fad26e965d
tree3c6c03b10aa74bdece59ddae976af6550bca1ee0
parented0f5f93e9f0b0b3cc1a37ee5b10b625590f08c8
odb: add transaction interface

Transactions are managed via the {begin,end}_odb_transaction() function
in the object-file subsystem and its implementation is specific to the
files object source. Introduce odb_transaction_{begin,commit}() in the
odb subsystem to provide an eventual object source agnostic means to
manage transactions.

Update call sites to instead manage transactions through the odb
subsystem. Also rename {begin,end}_odb_transaction() functions to
object_file_transaction_{begin,commit}() to clarify the object source it
supports.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/add.c
builtin/unpack-objects.c
builtin/update-index.c
cache-tree.c
object-file.c
object-file.h
odb.c
odb.h
read-cache.c