built-in add -i: implement the `status` command
authorDaniel Ferreira <redacted>
Wed, 13 Nov 2019 12:40:59 +0000 (12:40 +0000)
committerJunio C Hamano <redacted>
Thu, 14 Nov 2019 02:10:04 +0000 (11:10 +0900)
commit5e82b9e4d2bac376a817b2b48849ec061c137e49
tree455afb0cbe4aea40ddf8a3183a1941e207094db7
parente4cb659ebdd7c21976f9088226cbcc96acaa1dff
built-in add -i: implement the `status` command

This implements the `status` command of `git add -i`. The data
structures introduced in this commit will be extended later, as needed.

At this point, we re-implement only part of the `list_and_choose()`
function of the Perl script `git-add--interactive.perl` and call it
`list()`. It does not yet color anything, or do columns, or allow user
input.

Over the course of the next commits, we will introduce a
`list_and_choose()` function that uses `list()` to display the list of
options and let the user choose one or more of the displayed items. This
will be used to implement the main loop of the built-in `git add -i`, at
which point the new `status` command can actually be used.

Signed-off-by: Daniel Ferreira <redacted>
Signed-off-by: Slavica Đukić <redacted>
Signed-off-by: Johannes Schindelin <redacted>
Signed-off-by: Junio C Hamano <redacted>
add-interactive.c
git clone https://git.99rst.org/PROJECT