path: root/sequencer.c
diff options
authorAlban Gruin <>2019-11-24 17:43:29 (GMT)
committerJunio C Hamano <>2019-11-25 03:24:48 (GMT)
commit34065541e3f99ce23ac431032daf9d72072e650b (patch)
tree479bcca551cfa38446af8df44e21b5a559cc9b11 /sequencer.c
parent8638114e063f60fef678d51ca904da7c4e1ab3c0 (diff)
sequencer: update `done_nr' when skipping commands in a todo list
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. 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 <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'sequencer.c')
1 files changed, 1 insertions, 0 deletions
diff --git a/sequencer.c b/sequencer.c
index 575b852..42313f8 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -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));