Skip to content

Commit 92de4c5

Browse files
peffgitster
authored andcommitted
commit-graph: drop redundant call to "lite" verification
The idea of verify_commit_graph_lite() is to have cheap verification checks both for everyday use of the graph files (to avoid out of bounds reads, etc) as well as for doing a full check via "commit-graph verify" (which will also check the hash, etc). But the expensive verification checks operate on a commit_graph struct, which we get by using the normal everyday-reader code! So any problem we'd find by calling it would have been found before we even got to the verify_one_commit_graph() function. Removing it simplifies the code a bit, but also frees us up to move the "lite" verification steps around within that everyday-reader code. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9d78fb0 commit 92de4c5

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

commit-graph.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2690,10 +2690,6 @@ static int verify_one_commit_graph(struct repository *r,
26902690
struct commit *seen_gen_zero = NULL;
26912691
struct commit *seen_gen_non_zero = NULL;
26922692

2693-
verify_commit_graph_error = verify_commit_graph_lite(g);
2694-
if (verify_commit_graph_error)
2695-
return verify_commit_graph_error;
2696-
26972693
if (!commit_graph_checksum_valid(g)) {
26982694
graph_report(_("the commit-graph file has incorrect checksum and is likely corrupt"));
26992695
verify_commit_graph_error = VERIFY_COMMIT_GRAPH_ERROR_HASH;

0 commit comments

Comments
 (0)