[PATCH v2 04/11] object-file: drop check for inflight transactions
- From
Justin Tobler <jltobler@gmail.com>
- Date
- Jul 8, 2026, 04:14 UTC
- Message-ID
- <20260708041412.1157499-5-jltobler@gmail.com>
- In-Reply-To
- <20260708041412.1157499-1-jltobler@gmail.com>
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> --- object-file.c | 4 ---- object-file.h | 3 +-- 2 files changed, 1 insertion(+), 6 deletions(-)
diff --git a/object-file.c b/object-file.c index 33bd6c6810..e51389833a 100644 --- a/object-file.c +++ b/object-file.c @@ -1678,10 +1678,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; diff --git a/object-file.h b/object-file.h index 528c4e6e69..ea43d818f0 100644 --- a/object-file.h +++ b/object-file.h @@ -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);
-- 2.55.0.122.gf85a7e6620