mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
object-file: relocate ODB transaction code
The bulk-checkin subsystem provides various functions to manage ODB
transactions. Apart from {begin,end}_odb_transaction(), these functions
are only used by the object-file subsystem to manage aspects of a
transaction implementation specific to the files object source.
Relocate all the transaction code in bulk-checkin to object-file. This
simplifies the exposed transaction interface by reducing it to only
{begin,end}_odb_transaction(). Function and type names are adjusted in
the subsequent commit to better fit the new location.
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
ca7d93453b
commit
78839e9cde
@@ -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. end_odb_transaction must be called
|
||||
* to make new objects visible. If a transaction is already
|
||||
* pending, NULL is returned.
|
||||
*/
|
||||
struct odb_transaction *begin_odb_transaction(struct object_database *odb);
|
||||
|
||||
/*
|
||||
* Tell the object database to make any objects from the
|
||||
* current transaction visible.
|
||||
*/
|
||||
void end_odb_transaction(struct odb_transaction *transaction);
|
||||
|
||||
#endif /* OBJECT_FILE_H */
|
||||
|
||||
Reference in New Issue
Block a user