Re: [PATCH 2/8] built-in add -i: prepare for multi-selection commands
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Nov 25, 2019, 15:21 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1911251621180.31080@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqa78p8x6c.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Thu, 21 Nov 2019, Junio C Hamano wrote:
Show 10 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > writes: > > > From: Johannes Schindelin <johannes.schindelin@gmx.de> > > > > The `upgrade`, `revert` and `add-untracked` commands allow selecting > > multiple entries. Let's extend the `list_and_choose()` function to > > accommodate those use cases. > > upgrade???
Whoooooops. "update", of course.
Show 20 quoted lines
> >
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> > add-interactive.c | 114 ++++++++++++++++++++++++++++++++++++----------
> > 1 file changed, 89 insertions(+), 25 deletions(-)
> >
> > diff --git a/add-interactive.c b/add-interactive.c
> > index 8ec930ac15..33a751150a 100644
> > --- a/add-interactive.c
> > +++ b/add-interactive.c
> > @@ -72,15 +72,17 @@ static void init_add_i_state(struct add_i_state *s, struct repository *r)
> > struct prefix_item_list {
> > struct string_list items;
> > struct string_list sorted;
> > + int *selected; /* for multi-selections */
> > size_t min_length, max_length;
> > };
>
> OK. The shape of the data is enough to tell us what you did in this
> patch and I think it makes sense ;-):-)
Thanks, Dscho