| 71 | } |
| 72 | |
| 73 | int 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 | |
| 99 | done: |
| 100 | free_commit_graph(graph); |
| 101 | return ret; |
| 102 | } |
nothing calls this directly
no test coverage detected