diff options
| author | Justin Tobler <jltobler@gmail.com> | 2025-08-22 16:34:58 -0500 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-08-25 09:48:13 -0700 |
| commit | b3361447256bb92a1dbdda910a33cfb1d6fc8f88 (patch) | |
| tree | d6d52cf269972a5950dc7aac44204e2a16d274bb /cache-tree.c | |
| parent | bulk-checkin: introduce object database transaction structure (diff) | |
| download | git-b3361447256bb92a1dbdda910a33cfb1d6fc8f88.tar.gz git-b3361447256bb92a1dbdda910a33cfb1d6fc8f88.zip | |
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>
Diffstat (limited to 'cache-tree.c')
| -rw-r--r-- | cache-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cache-tree.c b/cache-tree.c index 66ef2becbe..d225554eed 100644 --- a/cache-tree.c +++ b/cache-tree.c @@ -474,6 +474,7 @@ static int update_one(struct cache_tree *it, int cache_tree_update(struct index_state *istate, int flags) { + struct odb_transaction *transaction; int skip, i; i = verify_cache(istate, flags); @@ -489,10 +490,10 @@ int cache_tree_update(struct index_state *istate, int flags) trace_performance_enter(); trace2_region_enter("cache_tree", "update", the_repository); - begin_odb_transaction(); + transaction = begin_odb_transaction(the_repository->objects); i = update_one(istate->cache_tree, istate->cache, istate->cache_nr, "", 0, &skip, flags); - end_odb_transaction(); + end_odb_transaction(transaction); trace2_region_leave("cache_tree", "update", the_repository); trace_performance_leave("cache_tree_update"); if (i < 0) |
