Skip to content

Commit

Permalink
commit-graph: increment progress indicator
Browse files Browse the repository at this point in the history
This fixes a bug that was introduced by 368d19b (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 <[email protected]>
Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
derrickstolee authored and dscho committed Jun 5, 2024
1 parent 7b0defb commit 8d96638
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion commit-graph.c
Original file line number Diff line number Diff line change
Expand Up @@ -1597,7 +1597,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;
Expand Down

0 comments on commit 8d96638

Please sign in to comment.