bulk-checkin: remove global transaction state
Object database transactions in the bulk-checkin subsystem rely on global state to track transaction status. Stop relying on global state and instead store the transaction in the `struct object_database`. Functions that operate on transactions are updated to now wire transaction state. 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
98518304c5
commit
b336144725
8
odb.h
8
odb.h
@@ -84,6 +84,7 @@ struct odb_source {
|
||||
|
||||
struct packed_git;
|
||||
struct cached_object_entry;
|
||||
struct odb_transaction;
|
||||
|
||||
/*
|
||||
* The object database encapsulates access to objects in a repository. It
|
||||
@@ -94,6 +95,13 @@ struct object_database {
|
||||
/* Repository that owns this database. */
|
||||
struct repository *repo;
|
||||
|
||||
/*
|
||||
* State of current current object database transaction. Only one
|
||||
* transaction may be pending at a time. Is NULL when no transaction is
|
||||
* configured.
|
||||
*/
|
||||
struct odb_transaction *transaction;
|
||||
|
||||
/*
|
||||
* Set of all object directories; the main directory is first (and
|
||||
* cannot be NULL after initialization). Subsequent directories are
|
||||
|
||||
Reference in New Issue
Block a user