Merge branch 'sr/add--interactive-term-readkey'

* sr/add--interactive-term-readkey:
  git-add--interactive: warn if module for interactive.singlekey is missing
  git-config: document interactive.singlekey requires Term::ReadKey
This commit is contained in:
Junio C Hamano 2014-03-14 14:27:21 -07:00
commit e8cb4996ad
2 changed files with 4 additions and 1 deletions

View File

@ -1643,7 +1643,7 @@ interactive.singlekey::
linkgit:git-add[1], linkgit:git-checkout[1], linkgit:git-commit[1],
linkgit:git-reset[1], and linkgit:git-stash[1]. Note that this
setting is silently ignored if portable keystroke input
is not available.
is not available; requires the Perl module Term::ReadKey.
log.abbrevCommit::
If true, makes linkgit:git-log[1], linkgit:git-show[1], and

View File

@ -58,6 +58,9 @@ if ($repo->config_bool("interactive.singlekey")) {
Term::ReadKey->import;
$use_readkey = 1;
};
if (!$use_readkey) {
print STDERR "missing Term::ReadKey, disabling interactive.singlekey\n";
}
eval {
require Term::Cap;
my $termcap = Term::Cap->Tgetent;