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

Function cache_tree_fully_valid

cache-tree.c:236–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

234}
235
236int cache_tree_fully_valid(struct cache_tree *it)
237{
238 int i;
239 if (!it)
240 return 0;
241 if (it->entry_count < 0 ||
242 !odb_has_object(the_repository->objects, &it->oid,
243 ODB_HAS_OBJECT_RECHECK_PACKED | ODB_HAS_OBJECT_FETCH_PROMISOR))
244 return 0;
245 for (i = 0; i < it->subtree_nr; i++) {
246 if (!cache_tree_fully_valid(it->down[i]->cache_tree))
247 return 0;
248 }
249 return 1;
250}
251
252static int must_check_existence(const struct cache_entry *ce)
253{

Callers 7

write_index_as_treeFunction · 0.85
unpack_treesFunction · 0.85
get_cache_tree_oidFunction · 0.85
convert_to_sparseFunction · 0.85
merge_working_treeFunction · 0.85
prepare_indexFunction · 0.85

Calls 1

odb_has_objectFunction · 0.85

Tested by

no test coverage detected