From: Junio C Hamano Date: Thu, 21 Nov 2019 08:12:59 GMT Subject: Re: [PATCH 2/8] built-in add -i: prepare for multi-selection commands Message-ID: In-Reply-To: "Johannes Schindelin via GitGitGadget" writes: > From: Johannes Schindelin > > 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??? > > Signed-off-by: Johannes Schindelin > --- > 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 ;-)