From 7371612255492f062ee905e6d88c6234c6d4752a Mon Sep 17 00:00:00 2001 From: Garima Singh Date: Mon, 26 Aug 2019 09:29:58 -0700 Subject: commit-graph: add --[no-]progress to write and verify Add --[no-]progress to git commit-graph write and verify. The progress feature was introduced in 7b0f229 ("commit-graph write: add progress output", 2018-09-17) but the ability to opt-out was overlooked. Signed-off-by: Garima Singh Signed-off-by: Junio C Hamano --- commit-graph.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'commit-graph.c') diff --git a/commit-graph.c b/commit-graph.c index 9b02d2c426..1f23e90567 100644 --- a/commit-graph.c +++ b/commit-graph.c @@ -1992,8 +1992,10 @@ int verify_commit_graph(struct repository *r, struct commit_graph *g, int flags) if (verify_commit_graph_error & ~VERIFY_COMMIT_GRAPH_ERROR_HASH) return verify_commit_graph_error; - progress = start_progress(_("Verifying commits in commit graph"), - g->num_commits); + if (flags & COMMIT_GRAPH_WRITE_PROGRESS) + progress = start_progress(_("Verifying commits in commit graph"), + g->num_commits); + for (i = 0; i < g->num_commits; i++) { struct commit *graph_commit, *odb_commit; struct commit_list *graph_parents, *odb_parents; -- cgit 1.2.3-korg