]> Kevux Git Server - rit/commit
cache-tree: use index state repository in trace2 calls
authorJayesh Daga <jayeshdaga99@gmail.com>
Tue, 31 Mar 2026 10:02:53 +0000 (10:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 31 Mar 2026 16:39:03 +0000 (09:39 -0700)
commit882c8e351d700e1738e696dfbc6312617f394570
tree66348bc2070ca64bed9ed11ad5badf7ea1b28c27
parent5361983c075154725be47b65cca9a2421789e410
cache-tree: use index state repository in trace2 calls

trace2 calls in cache-tree.c use the global 'the_repository',
even though cache_tree_update() has access to an explicit
repository pointer via 'istate->repo'.

Using the global repository can result in incorrect trace2
output when multiple repository instances are in use, as
events may be attributed to the wrong repository.

Use 'istate->repo' in cache_tree_update() to ensure correct
repository attribution.

Other call sites are left unchanged as they do not have
access to a repository instance.

Signed-off-by: Jayesh Daga <jayeshdaga99@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache-tree.c