odb/transaction: use pluggable `begin_transaction()`
Each ODB source is expected to provide an ODB transaction implementation that should be used when starting a transaction. With d6fc6fe6f8 (odb/source: make `begin_transaction()` function pluggable, 2026-03-05), the `struct odb_source` now provides a pluggable callback for beginning transactions. Use the callback provided by the ODB source accordingly. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Justin Tobler committed
May 14, 2026 at 13:37 UTC
10cdbc7423b2f5f9c666c48fe8a6e6e044595799
1 file changed
+2
-2
odb/transaction.c
+2
-2
@@ -1,5 +1,5 @@
1
#include "git-compat-util.h"
2
-#include "object-file.h"
2
+#include "odb/source.h"
3
#include "odb/transaction.h"
4
5
struct odb_transaction *odb_transaction_begin(struct object_database *odb)
@@ -7,7 +7,7 @@ struct odb_transaction *odb_transaction_begin(struct object_database *odb)
7
if (odb->transaction)
8
return NULL;
9
10
- odb->transaction = odb_transaction_files_begin(odb->sources);
10
+ odb_source_begin_transaction(odb->sources, &odb->transaction);
11
12
return odb->transaction;
13
}