| 1159 | } |
| 1160 | |
| 1161 | static int should_write_commit_graph(struct gc_config *cfg UNUSED) |
| 1162 | { |
| 1163 | int result; |
| 1164 | struct cg_auto_data data; |
| 1165 | |
| 1166 | data.num_not_in_graph = 0; |
| 1167 | data.limit = 100; |
| 1168 | repo_config_get_int(the_repository, "maintenance.commit-graph.auto", |
| 1169 | &data.limit); |
| 1170 | |
| 1171 | if (!data.limit) |
| 1172 | return 0; |
| 1173 | if (data.limit < 0) |
| 1174 | return 1; |
| 1175 | |
| 1176 | result = refs_for_each_ref(get_main_ref_store(the_repository), |
| 1177 | dfs_on_ref, &data); |
| 1178 | |
| 1179 | repo_clear_commit_marks(the_repository, SEEN); |
| 1180 | |
| 1181 | return result; |
| 1182 | } |
| 1183 | |
| 1184 | static int run_write_commit_graph(struct maintenance_run_opts *opts) |
| 1185 | { |
nothing calls this directly
no test coverage detected