]> git.ipfire.org Git - thirdparty/git.git/commitdiff
bulk-checkin: drop flush_odb_transaction()
authorJustin Tobler <jltobler@gmail.com>
Tue, 16 Sep 2025 18:29:35 +0000 (13:29 -0500)
committerJunio C Hamano <gitster@pobox.com>
Tue, 16 Sep 2025 18:37:05 +0000 (11:37 -0700)
Object database transactions can be explicitly flushed via
flush_odb_transaction() without actually completing the transaction.
This makes the provided transactional interface a bit awkward. Now that
there are no longer any flush_odb_transaction() call sites, drop the
function to simplify the interface and further ensure that a transaction
is only finalized when end_odb_transaction() is invoked.

Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
bulk-checkin.c
bulk-checkin.h

index eb6ef704c3c75877e6d2551e13a4f164169f7e36..5de848deffe41f649a0f60202e8246ab69c37573 100644 (file)
@@ -376,15 +376,6 @@ struct odb_transaction *begin_odb_transaction(struct object_database *odb)
        return odb->transaction;
 }
 
-void flush_odb_transaction(struct odb_transaction *transaction)
-{
-       if (!transaction)
-               return;
-
-       flush_batch_fsync(transaction);
-       flush_bulk_checkin_packfile(transaction);
-}
-
 void end_odb_transaction(struct odb_transaction *transaction)
 {
        if (!transaction)
@@ -395,7 +386,8 @@ void end_odb_transaction(struct odb_transaction *transaction)
         */
        ASSERT(transaction == transaction->odb->transaction);
 
-       flush_odb_transaction(transaction);
+       flush_batch_fsync(transaction);
+       flush_bulk_checkin_packfile(transaction);
        transaction->odb->transaction = NULL;
        free(transaction);
 }
index 51d0ac6134e79e769677bcab10fe75e394d5f55a..eea728f0d41e5305a4a28808c9ae26e0d80f493d 100644 (file)
@@ -43,13 +43,6 @@ int index_blob_bulk_checkin(struct odb_transaction *transaction,
  */
 struct odb_transaction *begin_odb_transaction(struct object_database *odb);
 
-/*
- * Make any objects that are currently part of a pending object
- * database transaction visible. It is valid to call this function
- * even if no transaction is active.
- */
-void flush_odb_transaction(struct odb_transaction *transaction);
-
 /*
  * Tell the object database to make any objects from the
  * current transaction visible.