summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a301973)
raw | patch | inline | side by side (parent: a301973)
author | Thomas Rast <trast@student.ethz.ch> | |
Fri, 6 Feb 2009 19:30:01 +0000 (20:30 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 7 Feb 2009 08:37:36 +0000 (00:37 -0800) |
eval{use...} is no good because the 'use' is evaluated at compile
time, so manually 'require' it. We need to forward declare the
functions we use, otherwise Perl raises a compilation error.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
time, so manually 'require' it. We need to forward declare the
functions we use, otherwise Perl raises a compilation error.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl | patch | blob | history |
index be8ca8ebb29511d710e86eb70b3293774a1e8c59..ec47888f5775b8626a4c2c3863968af7c3b2f4e1 100755 (executable)
my $normal_color = $repo->get_color("", "reset");
my $use_readkey = 0;
+sub ReadMode;
+sub ReadKey;
if ($repo->config_bool("interactive.singlekey")) {
eval {
- use Term::ReadKey;
+ require Term::ReadKey;
+ Term::ReadKey->import;
$use_readkey = 1;
};
}