Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commit-graph.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/commit-graph.c b/commit-graph.c
index e846920935..bb56733d8c 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -2708,10 +2708,11 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags)
return 1;
}
- local_error = verify_one_commit_graph(r, g, flags);
-
- if (!(flags & COMMIT_GRAPH_VERIFY_SHALLOW) && g->base_graph)
- local_error |= verify_commit_graph(r, g->base_graph, flags);
+ for (; g; g = g->base_graph) {
+ local_error |= verify_one_commit_graph(r, g, flags);
+ if (flags & COMMIT_GRAPH_VERIFY_SHALLOW)
+ break;
+ }
return local_error;
}