MCPcopy Create free account
hub / github.com/git/git / find_cache_tree_from_traversal

Function find_cache_tree_from_traversal

cache-tree.c:876–885  ·  view source on GitHub ↗

* find the cache_tree that corresponds to the current level without * exploding the full path into textual form. The root of the * cache tree is given as "root", and our current level is "info". * (1) When at root level, info->prev is NULL, so it is "root" itself. * (2) Otherwise, find the cache_tree that corresponds to one level * above us, and find ourselves in there. */

Source from the content-addressed store, hash-verified

874 * above us, and find ourselves in there.
875 */
876static struct cache_tree *find_cache_tree_from_traversal(struct cache_tree *root,
877 struct traverse_info *info)
878{
879 struct cache_tree *our_parent;
880
881 if (!info->prev)
882 return root;
883 our_parent = find_cache_tree_from_traversal(root, info->prev);
884 return cache_tree_find(our_parent, info->name);
885}
886
887int cache_tree_matches_traversal(struct cache_tree *root,
888 struct name_entry *ent,

Callers 1

Calls 1

cache_tree_findFunction · 0.85

Tested by

no test coverage detected