Re: [PATCH v1 1/5] sequencer: update `total_nr' when adding an item to a todo list
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Oct 2, 2019, 08:06 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1910021005050.46@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqbluzhp8g.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Wed, 2 Oct 2019, Junio C Hamano wrote:
Show 10 quoted lines
> Alban Gruin <alban.gruin@gmail.com> writes: > > > `total_nr' is the total amount of items, done and toto, that are in a > > todo list. But unlike `nr', it was not updated when an item was > > appended to the list. > > s/amount/number/, as amount is specifically for something > that cannot be counted. > > Perhaps a stupid language question but what is "toto"?
"in toto" is Latin for "in total", if I remember correctly.
But in this instance, I think it is merely a typo and should have been "todo" instead. That is what the "total_nr" is about: the number of "done" and "todo" items, added together.
Ciao, Dscho
Show 22 quoted lines
>
>
> > This variable is mostly used by command prompts (ie. git-prompt.sh and
> > the like).
> >
> > Signed-off-by: Alban Gruin <alban.gruin@gmail.com>
> > ---
> > sequencer.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/sequencer.c b/sequencer.c
> > index d648aaf416..575b852a5a 100644
> > --- a/sequencer.c
> > +++ b/sequencer.c
> > @@ -2070,6 +2070,7 @@ void todo_list_release(struct todo_list *todo_list)
> > static struct todo_item *append_new_todo(struct todo_list *todo_list)
> > {
> > ALLOC_GROW(todo_list->items, todo_list->nr + 1, todo_list->alloc);
> > + todo_list->total_nr++;
> > return todo_list->items + todo_list->nr++;
> > }
>