diff options
author | Jeff King <peff@peff.net> | 2023-11-09 08:13:12 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-11-09 11:07:53 +0100 |
commit | 92de4c5d56d084325997ca057701b65a9e79276a (patch) | |
tree | 9e100c2f52f9437a2261e551ec58fdc2267781b2 /commit-graph.c | |
parent | midx: check consistency of fanout table (diff) | |
download | git-92de4c5d56d084325997ca057701b65a9e79276a.tar.xz git-92de4c5d56d084325997ca057701b65a9e79276a.zip |
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r-- | commit-graph.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/commit-graph.c b/commit-graph.c index d2f1387a8b..87e594c42e 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -2690,10 +2690,6 @@ static int verify_one_commit_graph(struct repository *r, struct commit *seen_gen_zero = NULL; struct commit *seen_gen_non_zero = NULL; - verify_commit_graph_error = verify_commit_graph_lite(g); - if (verify_commit_graph_error) - return verify_commit_graph_error; - if (!commit_graph_checksum_valid(g)) { graph_report(_("the commit-graph file has incorrect checksum and is likely corrupt")); verify_commit_graph_error = VERIFY_COMMIT_GRAPH_ERROR_HASH; |