Re: Quick merge status updates.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <junkio@xxxxxxx> writes:

> Gaah.  You are right.
>
> PERL5LIB does not seem to just do a push (and that was I thought
> why unshift was a way to defeat it) but do something more evil.
> ...
> I thought we killed this showstopper and was hoping now the
> series is mergeable to "next" but apparently not yet X-<.
>
> Sigh....

Yuck; that means we would need to have something evil like this.

-- >8 --
Perly Git: make sure we do test the freshly built one.

We could BEGIN { push @INC, '@@INSTLIBDIR@@'; } but that is not
a good idea for normal execution.  The would prevent a
workaround for a user who is trying to override an old, faulty
Git.pm installed on the system path with a newer version
installed under $HOME/.

Signed-off-by: Junio C Hamano <junkio@xxxxxxx>

---
diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl
index 1b23fa1..a9805dd 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 a604896..5134b80 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 fba0c51..298c6ca 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?"
 }

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]