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

Function cmd__dump_cache_tree

t/helper/test-dump-cache-tree.c:63–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63int cmd__dump_cache_tree(int ac UNUSED, const char **av UNUSED)
64{
65 struct index_state istate;
66 struct cache_tree *another = cache_tree();
67 int ret;
68
69 setup_git_directory(the_repository);
70 if (repo_read_index(the_repository) < 0)
71 die("unable to read index file");
72 istate = *the_repository->index;
73 istate.cache_tree = another;
74 cache_tree_update(&istate, WRITE_TREE_DRY_RUN);
75 ret = dump_cache_tree(the_repository->index->cache_tree, another, "");
76 cache_tree_free(&another);
77
78 return ret;
79}

Callers

nothing calls this directly

Calls 7

setup_git_directoryFunction · 0.85
repo_read_indexFunction · 0.85
cache_tree_updateFunction · 0.85
dump_cache_treeFunction · 0.85
cache_tree_freeFunction · 0.85
cache_treeClass · 0.70
dieFunction · 0.50

Tested by

no test coverage detected