Skip to main content

refresh_cache_tree

Function refresh_cache_tree 

Source
pub fn refresh_cache_tree(index: &mut Index, odb: &FileObjectDatabase)
Expand description

Rebuild the index cache-tree (TREE) extension from the current entries.

This is for commands that have just materialized a complete staged tree (read-tree, checkout/reset, write-tree/commit). Incremental index mutators should use [update_cache_tree_for_git_paths] so untouched valid subtrees can be preserved and touched paths become invalid, matching git-add.