]> git.ipfire.org Git - thirdparty/git.git/commit
index: add trace2 region for clear skip worktree
authorAnh Le <anh@canva.com>
Thu, 3 Nov 2022 23:05:00 +0000 (23:05 +0000)
committerTaylor Blau <me@ttaylorr.com>
Sat, 5 Nov 2022 00:28:28 +0000 (20:28 -0400)
commit89aaab11a34d9b4a7421fbd10a0e399135b2dc2c
tree70e056b394dde20a1a4e19d680dedb91ad5799ff
parent5af5e54106e20f65c913550c80aec3186b859e9b
index: add trace2 region for clear skip worktree

When using sparse checkout, clear_skip_worktree_from_present_files() must
enumerate index entries to find ones with the SKIP_WORKTREE bit to
determine whether those index entries exist on disk (in which case their
SKIP_WORKTREE bit should be removed).

In a large repository, this may take considerable time depending on the
size of the index.

Add a trace2 region to surface this information, keeping a count of how
many paths have been checked. Separately, keep counts after a full index is
materialized.

Signed-off-by: Anh Le <anh@canva.com>
Signed-off-by: Taylor Blau <me@ttaylorr.com>
sparse-index.c