summaryrefslogtreecommitdiff
path: root/odb.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-10-02 12:26:11 -0700
committerJunio C Hamano <gitster@pobox.com>2025-10-02 12:26:11 -0700
commitfd13909eb63ef121824f243183db6b1f49ef1aed (patch)
tree9a70143dbea20d9464bf48cecd287ee484171690 /odb.c
parent821f583da6d30a84249f75f33501504d597bc16b (diff)
parentce1661f9da70ea2ffcb54f7b544410fad26e965d (diff)
Merge branch 'jt/odb-transaction'
The work to build on the bulk-checkin infrastructure to create many objects at once in a transaction and to abstract it into the generic object layer continues. * jt/odb-transaction: odb: add transaction interface object-file: update naming from bulk-checkin object-file: relocate ODB transaction code bulk-checkin: drop flush_odb_transaction() builtin/update-index: end ODB transaction when --verbose is specified bulk-checkin: remove ODB transaction nesting
Diffstat (limited to 'odb.c')
-rw-r--r--odb.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/odb.c b/odb.c
index 75c443fe66..1fc1488891 100644
--- a/odb.c
+++ b/odb.c
@@ -1051,3 +1051,13 @@ void odb_clear(struct object_database *o)
hashmap_clear(&o->pack_map);
string_list_clear(&o->submodule_source_paths, 0);
}
+
+struct odb_transaction *odb_transaction_begin(struct object_database *odb)
+{
+ return object_file_transaction_begin(odb->sources);
+}
+
+void odb_transaction_commit(struct odb_transaction *transaction)
+{
+ object_file_transaction_commit(transaction);
+}