Merge branch 'jt/odb-transaction'

The work to build on the bulk-checkin infrastructure to create many
objects at once in a transaction and to abstract it into the
generic object layer continues.

* jt/odb-transaction:
  odb: add transaction interface
  object-file: update naming from bulk-checkin
  object-file: relocate ODB transaction code
  bulk-checkin: drop flush_odb_transaction()
  builtin/update-index: end ODB transaction when --verbose is specified
  bulk-checkin: remove ODB transaction nesting
This commit is contained in:
Junio C Hamano
2025-10-02 12:26:11 -07:00
13 changed files with 462 additions and 498 deletions

10
odb.c
View File

@@ -1051,3 +1051,13 @@ void odb_clear(struct object_database *o)
hashmap_clear(&o->pack_map);
string_list_clear(&o->submodule_source_paths, 0);
}
struct odb_transaction *odb_transaction_begin(struct object_database *odb)
{
return object_file_transaction_begin(odb->sources);
}
void odb_transaction_commit(struct odb_transaction *transaction)
{
object_file_transaction_commit(transaction);
}