pub fn verify_cache_tree(index: &Index) -> Result<()>Expand description
Walk a cache-tree against index, mirroring Git’s verify_one / cache_tree_verify.
Returns an error describing the first inconsistency. The only condition exercised by
t4058-diff-duplicates is a node whose entry_count runs past the end of the index
(entry_count + pos > cache_nr), which yields the exact upstream message
“corrupted cache-tree has entries not present in index”.
This is gated by callers behind GIT_TEST_CHECK_CACHE_TREE, matching upstream’s
write_locked_index.