Skip to main content

Module index_cache_tree

Module index_cache_tree 

Source
Expand description

In-process index update: the cache-tree extension. What: The TREE (cache-tree) index extension: read, written back byte for byte, and invalidated along a path (cache-tree.c: read_one, write_one, do_invalidate_path). Why: Git marks every directory above a changed path as not valid and drops a subtree that the path names; an in-process index update must leave the extension exactly as that does, or the next write-tree would trust a stale tree name.

In TS you’d write (pseudocode):

const tree = CacheTree.read(bytes, hashLength); tree.invalidate(path); const out = tree.write();

Structs§

CacheTree
One directory of the cache-tree.