add -p: prompt for single characters
commitca6ac7f1357df352fec247dc98a3e6784e6c3fea
authorThomas Rast <trast@student.ethz.ch>
Thu, 5 Feb 2009 08:28:26 +0000 (5 09:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Feb 2009 01:44:10 +0000 (5 17:44 -0800)
treeaccae1f69d9cfdba6e4b7e5a1e55bb1c1c4de86f
parent68c02d7c462e1748578209346f050a587c040139
add -p: prompt for single characters

Use Term::ReadKey, if available and enabled with interactive.singlekey,
to let the user answer add -p's prompts by pressing a single key.  We're
not doing the same in the main 'add -i' interface because file selection
etc. may expect several characters.

Two commands take an argument: 'g' can easily cope since it'll just
offer a choice of chunks.  '/' now (unconditionally, even without
readkey) offers a chance to enter a regex if none was given.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/config.txt
git-add--interactive.perl