object-file: drop check for inflight transactions
ODB transactions are started via `odb_transaction_begin()` and contain validation to avoid starting multiple transactions at the same time. The "files" backend also has the same logic, but is redundant due to the generic layer already handling it. Drop this validation from the "files" backend accordingly. Signed-off-by: Justin Tobler <jltobler@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Justin Tobler committed
Jul 10, 2026 at 11:37 UTC
926618e78cb345e69106f9cd3fb2651d99518919
2 files changed
+1
-6
object-file.c
-4
@@ -1676,10 +1676,6 @@ static void odb_transaction_files_commit(struct odb_transaction *base)
1676
struct odb_transaction *odb_transaction_files_begin(struct odb_source *source)
1677
{
1678
struct odb_transaction_files *transaction;
1679
- struct object_database *odb = source->odb;
1680
-
1681
- if (odb->transaction)
1682
- return NULL;
1679
1680
transaction = xcalloc(1, sizeof(*transaction));
1681
transaction->base.source = source;
object-file.h
+1
-2
@@ -194,8 +194,7 @@ struct odb_transaction;
194
/*
195
* Tell the object database to optimize for adding
196
* multiple objects. odb_transaction_files_commit must be called
197
- * to make new objects visible. If a transaction is already
198
- * pending, NULL is returned.
197
+ * to make new objects visible.
198
*/
199
struct odb_transaction *odb_transaction_files_begin(struct odb_source *source);
200