Skip to content

Commit

Permalink
sequencer: update `done_nr' when skipping commands in a todo list
Browse files Browse the repository at this point in the history
In a todo list, `done_nr' is the number of commands that were executed
or skipped, but skip_unnecessary_picks() did not update it.

This variable is mostly used by command prompts (ie. git-prompt.sh and
the like).  As in the previous commit, this inconsistent behaviour is
not a problem yet, but it would start to matter at the end of this
series the same reason.

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
agrn authored and gitster committed Nov 25, 2019
1 parent 8638114 commit 3406554
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions sequencer.c
Expand Up @@ -5054,6 +5054,7 @@ static int skip_unnecessary_picks(struct repository *r,
MOVE_ARRAY(todo_list->items, todo_list->items + i, todo_list->nr - i);
todo_list->nr -= i;
todo_list->current = 0;
todo_list->done_nr += i;

if (is_fixup(peek_command(todo_list, 0)))
record_in_rewritten(base_oid, peek_command(todo_list, 0));
Expand Down

0 comments on commit 3406554

Please sign in to comment.