]> git.ipfire.org Git - thirdparty/git.git/commit
add -p: only bind search key if there's more than one hunk
authorPhillip Wood <phillip.wood@dunelm.org.uk>
Tue, 13 Feb 2018 10:32:40 +0000 (10:32 +0000)
committerJunio C Hamano <gitster@pobox.com>
Tue, 13 Feb 2018 21:01:56 +0000 (13:01 -0800)
commit88f6ffc1c256ef241cbed33dabbdd23c1a7ac6a9
tree429a00b5acdcffdaa341133c97c55a88ac0b6815
parent01a6966021a50dc7aff76c0f951bbdd6e1bdd444
add -p: only bind search key if there's more than one hunk

If there is only a single hunk then disable searching as there is
nothing to search for. Also print a specific error message if the user
tries to search with '/' when there's only a single hunk rather than
just listing the key bindings.

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