Skip to content

Commit f4e4756

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 06fb135 commit f4e4756

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

commit-graph.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -275,23 +275,6 @@ struct commit_graph *load_commit_graph_one_fd_st(struct repository *r,
275275
return ret;
276276
}
277277

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-
295278
static int graph_read_oid_fanout(const unsigned char *chunk_start,
296279
size_t chunk_size, void *data)
297280
{
@@ -495,9 +478,6 @@ struct commit_graph *parse_commit_graph(struct repo_settings *s,
495478

496479
oidread(&graph->oid, graph->data + graph->data_len - graph->hash_len);
497480

498-
if (verify_commit_graph_lite(graph))
499-
goto free_and_return;
500-
501481
free_chunkfile(cf);
502482
return graph;
503483

0 commit comments

Comments
 (0)