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

Function cmd__read_graph

t/helper/test-read-graph.c:73–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

71}
72
73int cmd__read_graph(int argc, const char **argv)
74{
75 struct commit_graph *graph = NULL;
76 struct odb_source *source;
77 int ret = 0;
78
79 setup_git_directory(the_repository);
80 source = the_repository->objects->sources;
81
82 prepare_repo_settings(the_repository);
83
84 graph = read_commit_graph_one(source);
85 if (!graph) {
86 ret = 1;
87 goto done;
88 }
89
90 if (argc <= 1)
91 dump_graph_info(graph);
92 else if (!strcmp(argv[1], "bloom-filters"))
93 dump_graph_bloom_filters(graph);
94 else {
95 fprintf(stderr, "unknown sub-command: '%s'\n", argv[1]);
96 ret = 1;
97 }
98
99done:
100 free_commit_graph(graph);
101 return ret;
102}

Callers

nothing calls this directly

Calls 6

setup_git_directoryFunction · 0.85
prepare_repo_settingsFunction · 0.85
read_commit_graph_oneFunction · 0.85
dump_graph_infoFunction · 0.85
dump_graph_bloom_filtersFunction · 0.85
free_commit_graphFunction · 0.85

Tested by

no test coverage detected