Skip to content

Commit ec562fe

Browse files
jltoblergitster
authored andcommitted
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 d6fc6fe (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>
1 parent d429ab4 commit ec562fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

odb/transaction.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#include "git-compat-util.h"
2-
#include "object-file.h"
2+
#include "odb/source.h"
33
#include "odb/transaction.h"
44

55
struct odb_transaction *odb_transaction_begin(struct object_database *odb)
66
{
77
if (odb->transaction)
88
return NULL;
99

10-
odb->transaction = odb_transaction_files_begin(odb->sources);
10+
odb_source_begin_transaction(odb->sources, &odb->transaction);
1111

1212
return odb->transaction;
1313
}

0 commit comments

Comments
 (0)