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@xxxxxxxxx> --- bulk-checkin.c | 10 +--------- bulk-checkin.h | 7 ------- 2 files changed, 1 insertion(+), 16 deletions(-) diff --git a/bulk-checkin.c b/bulk-checkin.c index 0da5783090d..6f0343feda3 100644 --- a/bulk-checkin.c +++ b/bulk-checkin.c @@ -376,18 +376,10 @@ struct odb_transaction *begin_odb_transaction(struct object_database *odb) return odb->transaction; } -void flush_odb_transaction(struct odb_transaction *transaction) +void end_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) -{ - flush_odb_transaction(transaction); transaction->odb->transaction = NULL; free(transaction); } diff --git a/bulk-checkin.h b/bulk-checkin.h index b4536d81fc2..35e05640828 100644 --- a/bulk-checkin.h +++ b/bulk-checkin.h @@ -44,13 +44,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. -- 2.51.0.193.g4975ec3473b