diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-10-02 12:26:11 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-10-02 12:26:11 -0700 |
| commit | fd13909eb63ef121824f243183db6b1f49ef1aed (patch) | |
| tree | 9a70143dbea20d9464bf48cecd287ee484171690 /object-file.h | |
| parent | The thirteenth batcn (diff) | |
| parent | odb: add transaction interface (diff) | |
| download | git-fd13909eb63ef121824f243183db6b1f49ef1aed.tar.gz git-fd13909eb63ef121824f243183db6b1f49ef1aed.zip | |
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
Diffstat (limited to 'object-file.h')
| -rw-r--r-- | object-file.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/object-file.h b/object-file.h index 15d97630d3..3fd48dcafb 100644 --- a/object-file.h +++ b/object-file.h @@ -218,4 +218,20 @@ int read_loose_object(struct repository *repo, void **contents, struct object_info *oi); +struct odb_transaction; + +/* + * Tell the object database to optimize for adding + * multiple objects. object_file_transaction_commit must be called + * to make new objects visible. If a transaction is already + * pending, NULL is returned. + */ +struct odb_transaction *object_file_transaction_begin(struct odb_source *source); + +/* + * Tell the object database to make any objects from the + * current transaction visible. + */ +void object_file_transaction_commit(struct odb_transaction *transaction); + #endif /* OBJECT_FILE_H */ |
