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

Function all_trees_same_as_cache_tree

unpack-trees.c:754–769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

752}
753
754static int all_trees_same_as_cache_tree(int n, unsigned long dirmask,
755 struct name_entry *names,
756 struct traverse_info *info)
757{
758 struct unpack_trees_options *o = info->data;
759 int i;
760
761 if (!o->merge || dirmask != ((1 << n) - 1))
762 return 0;
763
764 for (i = 1; i < n; i++)
765 if (!are_same_oid(names, names + i))
766 return 0;
767
768 return cache_tree_matches_traversal(o->src_index->cache_tree, names, info);
769}
770
771static int index_pos_by_traverse_info(struct name_entry *names,
772 struct traverse_info *info)

Callers 1

traverse_trees_recursiveFunction · 0.85

Calls 2

are_same_oidFunction · 0.85

Tested by

no test coverage detected