summaryrefslogtreecommitdiff
path: root/notes-utils.c
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2023-05-13 08:11:25 +0000
committerJunio C Hamano <gitster@pobox.com>2023-05-14 21:44:50 -0700
commitfa5103dd8913366b031ad8daa11f27e9452638be (patch)
tree49739a887493b22929e19a7487ce18654dd7e3c8 /notes-utils.c
parentec583449067bab5b800ecc63926f35c9dae96fa1 (diff)
rebase --update-refs: fix loops
The `total_nr` field in the `todo_list` structure merely serves display purposes, and should only be used when generating the progress message. In these two instances, however, we want to loop over all of the commands in the parsed rebase script. The loop limit therefore needs to be `nr`, which refers to the count of commands in the current `todo_list`. This is important because the two numbers, `nr` and `total_nr` can differ wildly, e.g. due to `total_nr` _not_ counting comments or empty lines, while `nr` skips any commands that already moved from the `git-rebase-todo` file to the `done` file. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Phillip Wood <phillip.wood@dunelm.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'notes-utils.c')
0 files changed, 0 insertions, 0 deletions