aboutsummaryrefslogtreecommitdiffstats
path: root/object-file.h
diff options
context:
space:
mode:
authorJustin Tobler <jltobler@gmail.com>2025-09-16 13:29:38 -0500
committerJunio C Hamano <gitster@pobox.com>2025-09-16 11:37:06 -0700
commitce1661f9da70ea2ffcb54f7b544410fad26e965d (patch)
tree3c6c03b10aa74bdece59ddae976af6550bca1ee0 /object-file.h
parentobject-file: update naming from bulk-checkin (diff)
downloadgit-ce1661f9da70ea2ffcb54f7b544410fad26e965d.tar.gz
git-ce1661f9da70ea2ffcb54f7b544410fad26e965d.zip
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>
Diffstat (limited to 'object-file.h')
-rw-r--r--object-file.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/object-file.h b/object-file.h
index 6323d2e63c..3fd48dcafb 100644
--- a/object-file.h
+++ b/object-file.h
@@ -222,16 +222,16 @@ struct odb_transaction;
/*
* Tell the object database to optimize for adding
- * multiple objects. end_odb_transaction must be called
+ * multiple objects. object_file_transaction_commit must be called
* to make new objects visible. If a transaction is already
* pending, NULL is returned.
*/
-struct odb_transaction *begin_odb_transaction(struct object_database *odb);
+struct odb_transaction *object_file_transaction_begin(struct odb_source *source);
/*
* Tell the object database to make any objects from the
* current transaction visible.
*/
-void end_odb_transaction(struct odb_transaction *transaction);
+void object_file_transaction_commit(struct odb_transaction *transaction);
#endif /* OBJECT_FILE_H */