bulk-checkin: drop flush_odb_transaction()

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>

Justin Tobler committed Sep 16, 2025 at 13:29 UTC ca7d93453b6c309aa1fca411e1bdaa9ca4c82199
2 files changed +2 -17
bulk-checkin.c
+2 -10
@@ -376,15 +376,6 @@ struct odb_transaction *begin_odb_transaction(struct object_database *odb)
376 return odb->transaction;
377 }
378
379 -void flush_odb_transaction(struct odb_transaction *transaction)
380 -{
381 - if (!transaction)
382 - return;
383 -
384 - flush_batch_fsync(transaction);
385 - flush_bulk_checkin_packfile(transaction);
386 -}
387 -
379 void end_odb_transaction(struct odb_transaction *transaction)
380 {
381 if (!transaction)
@@ -395,7 +386,8 @@ void end_odb_transaction(struct odb_transaction *transaction)
386 */
387 ASSERT(transaction == transaction->odb->transaction);
388
398 - flush_odb_transaction(transaction);
389 + flush_batch_fsync(transaction);
390 + flush_bulk_checkin_packfile(transaction);
391 transaction->odb->transaction = NULL;
392 free(transaction);
393 }
bulk-checkin.h
-7
@@ -43,13 +43,6 @@ int index_blob_bulk_checkin(struct odb_transaction *transaction,
43 */
44 struct odb_transaction *begin_odb_transaction(struct object_database *odb);
45
46 -/*
47 - * Make any objects that are currently part of a pending object
48 - * database transaction visible. It is valid to call this function
49 - * even if no transaction is active.
50 - */
51 -void flush_odb_transaction(struct odb_transaction *transaction);
52 -
46 /*
47 * Tell the object database to make any objects from the
48 * current transaction visible.