summaryrefslogtreecommitdiff
path: root/commit-graph.c
diff options
context:
space:
mode:
authorDerrick Stolee <derrickstolee@github.com>2024-06-11 15:09:15 +0000
committerJunio C Hamano <gitster@pobox.com>2024-06-12 13:52:14 -0700
commitf1160393c172da29d0d0874c7d69ce76dbdc8c0c (patch)
tree76adbad7021591982e231a33a4286bf24c5f2f38 /commit-graph.c
parentcbfe360b140fe92d9c4a763bf630c3b8ba431522 (diff)
commit-graph: increment progress indicator
This fixes a bug that was introduced by 368d19b0b7 (commit-graph: refactor compute_topological_levels(), 2023-03-20): Previously, the progress indicator was updated from `i + 1` where `i` is the loop variable of the enclosing `for` loop. After this patch, the update used `info->progress_cnt + 1` instead, however, unlike `i`, the `progress_cnt` attribute was not incremented. Let's increment it. Signed-off-by: Derrick Stolee <derrickstolee@github.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> [jc: squashed in a test update from Patrick Steinhardt] Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit-graph.c')
-rw-r--r--commit-graph.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/commit-graph.c b/commit-graph.c
index 172e679db1..3c5a2010be 100644
--- a/commit-graph.c
+++ b/commit-graph.c
@@ -1487,7 +1487,7 @@ static void compute_reachable_generation_numbers(
timestamp_t gen;
repo_parse_commit(info->r, c);
gen = info->get_generation(c, info->data);
- display_progress(info->progress, info->progress_cnt + 1);
+ display_progress(info->progress, ++info->progress_cnt);
if (gen != GENERATION_NUMBER_ZERO && gen != GENERATION_NUMBER_INFINITY)
continue;