]> git.ipfire.org Git - thirdparty/git.git/commitdiff
object-file: drop check for inflight transactions
authorJustin Tobler <jltobler@gmail.com>
Fri, 10 Jul 2026 16:37:15 +0000 (11:37 -0500)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Jul 2026 20:21:53 +0000 (13:21 -0700)
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>
object-file.c
object-file.h

index 160ae093cc722718b3ab1be4fbc321b2b4a9da28..c16b2c2ac1c225567cec3f012f791fe38a9f0f44 100644 (file)
@@ -1676,10 +1676,6 @@ static void odb_transaction_files_commit(struct odb_transaction *base)
 struct odb_transaction *odb_transaction_files_begin(struct odb_source *source)
 {
        struct odb_transaction_files *transaction;
-       struct object_database *odb = source->odb;
-
-       if (odb->transaction)
-               return NULL;
 
        transaction = xcalloc(1, sizeof(*transaction));
        transaction->base.source = source;
index 528c4e6e697f8713b01f82c46f03c0c87eef6a6a..ea43d818f096cb3b5a7053ddadc6e213c57a738f 100644 (file)
@@ -194,8 +194,7 @@ struct odb_transaction;
 /*
  * Tell the object database to optimize for adding
  * multiple objects. odb_transaction_files_commit must be called
- * to make new objects visible. If a transaction is already
- * pending, NULL is returned.
+ * to make new objects visible.
  */
 struct odb_transaction *odb_transaction_files_begin(struct odb_source *source);