]> git.ipfire.org Git - thirdparty/git.git/commit
cache-tree: integrate with sparse directory entries
authorDerrick Stolee <dstolee@microsoft.com>
Tue, 30 Mar 2021 13:11:02 +0000 (13:11 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Mar 2021 19:57:48 +0000 (12:57 -0700)
commit2de37c536d54a28a032491ad4ef97632ef6ab836
treee9eb29e598eb4cbb34ac3609ad9fe1189642fb61
parentdcc5fd5fd26b71d75f9e70abd0e09e553b5f40ca
cache-tree: integrate with sparse directory entries

The cache-tree extension was previously disabled with sparse indexes.
However, the cache-tree is an important performance feature for commands
like 'git status' and 'git add'. Integrate it with sparse directory
entries.

When writing a sparse index, completely clear and recalculate the cache
tree. By starting from scratch, the only integration necessary is to
check if we hit a sparse directory entry and create a leaf of the
cache-tree that has an entry_count of one and no subtrees.

Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
cache-tree.c
sparse-index.c