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

Function list_tree

builtin/read-tree.c:29–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

27static struct tree *trees[MAX_UNPACK_TREES];
28
29static int list_tree(struct object_id *oid)
30{
31 struct tree *tree;
32
33 if (nr_trees >= MAX_UNPACK_TREES)
34 die("I cannot read more than %d trees", MAX_UNPACK_TREES);
35 tree = repo_parse_tree_indirect(the_repository, oid);
36 if (!tree)
37 return -1;
38 trees[nr_trees++] = tree;
39 return 0;
40}
41
42static const char * const read_tree_usage[] = {
43 N_("git read-tree [(-m [--trivial] [--aggressive] | --reset | --prefix=<prefix>)\n"

Callers 1

cmd_read_treeFunction · 0.85

Calls 2

repo_parse_tree_indirectFunction · 0.85
dieFunction · 0.50

Tested by

no test coverage detected