Skip to content

Commit

Permalink
Merge branch 'sr/add--interactive-term-readkey'
Browse files Browse the repository at this point in the history
* sr/add--interactive-term-readkey:
  git-add--interactive: warn if module for interactive.singlekey is missing
  git-config: document interactive.singlekey requires Term::ReadKey
  • Loading branch information
Junio C Hamano committed Mar 14, 2014
2 parents 56e2874 + b294097 commit e8cb499
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions git-add--interactive.perl
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
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;
Expand Down

0 comments on commit e8cb499

Please sign in to comment.