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>

Derrick Stolee committed Jun 11, 2024 at 15:09 UTC f1160393c172da29d0d0874c7d69ce76dbdc8c0c
2 files changed +2 -2
commit-graph.c
+1 -1
@@ -1487,7 +1487,7 @@ static void compute_reachable_generation_numbers(
1487 timestamp_t gen;
1488 repo_parse_commit(info->r, c);
1489 gen = info->get_generation(c, info->data);
1490 - display_progress(info->progress, info->progress_cnt + 1);
1490 + display_progress(info->progress, ++info->progress_cnt);
1491
1492 if (gen != GENERATION_NUMBER_ZERO && gen != GENERATION_NUMBER_INFINITY)
1493 continue;
t/t6500-gc.sh
+1 -1
@@ -174,7 +174,7 @@ test_expect_success TTY 'with TTY: gc --no-quiet' '
174 git -c gc.writeCommitGraph=true gc --no-quiet >stdout 2>stderr &&
175 test_must_be_empty stdout &&
176 test_i18ngrep "Enumerating objects" stderr &&
177 - test_i18ngrep "Computing commit graph generation numbers" stderr
177 + test_i18ngrep "Computing commit graph generation numbers: 100% (4/4), done." stderr
178 '
179
180 test_expect_success 'gc --quiet' '