commit-graph: drop verify_commit_graph_lite()

As we've moved all of the checks from this function directly into the chunk-reading code used by the caller (and there is only one caller), we can just drop it entirely. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jeff King committed Nov 9, 2023 at 02:25 UTC f4e4756c545359fed7786b11d22f84db61babe21
1 file changed -20
commit-graph.c
-20
@@ -275,23 +275,6 @@ struct commit_graph *load_commit_graph_one_fd_st(struct repository *r,
275 return ret;
276 }
277
278 -static int verify_commit_graph_lite(struct commit_graph *g)
279 -{
280 - /*
281 - * Basic validation shared between parse_commit_graph()
282 - * which'll be called every time the graph is used, and the
283 - * much more expensive verify_commit_graph() used by
284 - * "commit-graph verify".
285 - *
286 - * There should only be very basic checks here to ensure that
287 - * we don't e.g. segfault in fill_commit_in_graph(), but
288 - * because this is a very hot codepath nothing that e.g. loops
289 - * over g->num_commits, or runs a checksum on the commit-graph
290 - * itself.
291 - */
292 - return 0;
293 -}
294 -
278 static int graph_read_oid_fanout(const unsigned char *chunk_start,
279 size_t chunk_size, void *data)
280 {
@@ -495,9 +478,6 @@ struct commit_graph *parse_commit_graph(struct repo_settings *s,
478
479 oidread(&graph->oid, graph->data + graph->data_len - graph->hash_len);
480
498 - if (verify_commit_graph_lite(graph))
499 - goto free_and_return;
500 -
481 free_chunkfile(cf);
482 return graph;
483