sequencer: update `total_nr' when adding an item to a todo list
commit8638114e063f60fef678d51ca904da7c4e1ab3c0
authorAlban Gruin <alban.gruin@gmail.com>
Sun, 24 Nov 2019 17:43:28 +0000 (24 18:43 +0100)
committerJunio C Hamano <gitster@pobox.com>
Mon, 25 Nov 2019 03:24:48 +0000 (25 12:24 +0900)
tree2505792cee2cd6112a90c553e1e5a0bf57f52943
parentbc12974a897308fd3254cf0cc90319078fe45eea
sequencer: update `total_nr' when adding an item to a todo list

`total_nr' is the total number of items, counting both done and todo,
that are in a todo list.  But unlike `nr', it was not updated when an
item was appended to the list.

This variable is mostly used by command prompts (ie. git-prompt.sh and
the like).  By forgetting to update it, the original code made it not
reflect the reality, but this flaw was masked by the code calling
unnecessarily read_populate_todo() again to update the variable to its
correct value.  At the end of this series, the unnecessary call will be
removed, and the inconsistency addressed by this patch would start to
matter.

Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sequencer.c