summaryrefslogtreecommitdiff
path: root/Documentation/git-update-index.txt
diff options
context:
space:
mode:
authorAlexander Kuleshov <kuleshovmail@gmail.com>2015-01-22 08:39:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2015-01-22 22:44:36 (GMT)
commita9c4641df7989c9adf6af471705ebf735c35a92f (patch)
tree11dbd9a438755f5c3a295a8f82ef0db863ce8611 /Documentation/git-update-index.txt
parent282616c72d1d08a77ca4fe1186cb708c38408d87 (diff)
downloadgit-a9c4641df7989c9adf6af471705ebf735c35a92f.zip
git-a9c4641df7989c9adf6af471705ebf735c35a92f.tar.gz
git-a9c4641df7989c9adf6af471705ebf735c35a92f.tar.bz2
add -i: return from list_and_choose if there is no candidate
The list_and_choose() helper is given a prompt and a list, asks the user to make selection from the list, and then returns a list of items chosen. Even when it is given an empty list as the original candidate set to choose from, it gave a prompt to the user, who can only say "I am done choosing". Return an empty result when the input is an empty list without bothering the user. The existing caller must already have a logic to say "Nothing to do" or an equivalent when the returned list is empty (i.e. the user chose to select nothing) if it is necessary, so no change to the callers is necessary. This fixes the case where "add untracked" is asked in "git add -i" and there is no untracked files in the working tree. We used to give an empty list of files to choose from with a prompt, but with this change, we no longer do. Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-update-index.txt')
0 files changed, 0 insertions, 0 deletions