aboutsummaryrefslogtreecommitdiff
path: root/cache-tree.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-09-15 08:52:05 -0700
committerJunio C Hamano <gitster@pobox.com>2025-09-15 08:52:05 -0700
commit7d00521d7be21ca4a3713b2fa367eb7296212e09 (patch)
tree7eb6850b179d543a59177c8363ec90dc0768fce8 /cache-tree.c
parent92c87bdc406e5bcf1b516a861d609b03d99c23b7 (diff)
parentddc0b56ad77d7c86145a6a1774f05f9d11bf2337 (diff)
downloadgit-7d00521d7be21ca4a3713b2fa367eb7296212e09.tar.xz
Merge branch 'jt/de-global-bulk-checkin'
The bulk-checkin code used to depend on a file-scope static singleton variable, which has been updated to pass an instance throughout the callchain. * jt/de-global-bulk-checkin: bulk-checkin: use repository variable from transaction bulk-checkin: require transaction for index_blob_bulk_checkin() bulk-checkin: remove global transaction state bulk-checkin: introduce object database transaction structure
Diffstat (limited to 'cache-tree.c')
-rw-r--r--cache-tree.c5
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)