]> git.ipfire.org Git - thirdparty/git.git/commit - git-add--interactive.perl
add -p: only display help for active keys
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Tue, 13 Feb 2018 10:32:39 +0000 (10:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Feb 2018 21:01:56 +0000 (13:01 -0800)
commit01a6966021a50dc7aff76c0f951bbdd6e1bdd444
tree8c4db6eca1404a7faede18942b1862554d87ba87
parent5be1f00a9a701532232f57958efab4be8c959a29
add -p: only display help for active keys

If the user presses a key that add -p wasn't expecting then it prints
a list of key bindings. Although the prompt only lists the active
bindings the help was printed for all bindings.  Fix this by using the
list of keys in the prompt to filter the help. Note that the list of
keys was already passed to help_patch_cmd() by the caller so there is
no change needed to the call site.

Signed-off-by: Phillip Wood <phillip.wood@dunelm.org.uk>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl