diff options
-rwxr-xr-x | git-fmt-merge-msg.perl | 6 | ||||
-rwxr-xr-x | git-mv.perl | 6 | ||||
-rwxr-xr-x | t/test-lib.sh | 3 |
3 files changed, 12 insertions, 3 deletions
diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl index 1b23fa150..a9805dd51 100755 --- a/git-fmt-merge-msg.perl +++ b/git-fmt-merge-msg.perl @@ -5,7 +5,11 @@ # Read .git/FETCH_HEAD and make a human readable merge message # by grouping branches and tags together to form a single line. -BEGIN { unshift @INC, '@@INSTLIBDIR@@'; } +BEGIN { + unless (exists $ENV{'RUNNING_GIT_TESTS'}) { + unshift @INC, '@@INSTLIBDIR@@'; + } +} use strict; use Git; use Error qw(:try); diff --git a/git-mv.perl b/git-mv.perl index a60489617..5134b805a 100755 --- a/git-mv.perl +++ b/git-mv.perl @@ -6,7 +6,11 @@ # This file is licensed under the GPL v2, or a later version # at the discretion of Linus Torvalds. -BEGIN { unshift @INC, '@@INSTLIBDIR@@'; } +BEGIN { + unless (exists $ENV{'RUNNING_GIT_TESTS'}) { + unshift @INC, '@@INSTLIBDIR@@'; + } +} use warnings; use strict; use Getopt::Std; diff --git a/t/test-lib.sh b/t/test-lib.sh index fba0c51d9..298c6caa7 100755 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -206,8 +206,9 @@ PYTHON=`sed -e '1{ PYTHONPATH=$(pwd)/../compat export PYTHONPATH } +RUNNING_GIT_TESTS=YesWeAre PERL5LIB=$(pwd)/../perl/blib/lib:$(pwd)/../perl/blib/arch/auto/Git -export PERL5LIB +export PERL5LIB RUNNING_GIT_TESTS test -d ../templates/blt || { error "You haven't built things yet, have you?" } |