* 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. */
| 874 | * above us, and find ourselves in there. |
| 875 | */ |
| 876 | static 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 | |
| 887 | int cache_tree_matches_traversal(struct cache_tree *root, |
| 888 | struct name_entry *ent, |
no test coverage detected