From 876f6517f5a9605ab3ebdfedbe2e2ed93a242acf Mon Sep 17 00:00:00 2001 From: Sitaram Chamarty Date: Thu, 15 Mar 2012 15:05:51 +0530 Subject: [PATCH] (testing help) allow a *testing* rc to override the normal one --- src/Gitolite/Rc.pm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Gitolite/Rc.pm b/src/Gitolite/Rc.pm index 2a51a55..139d6e3 100644 --- a/src/Gitolite/Rc.pm +++ b/src/Gitolite/Rc.pm @@ -52,6 +52,10 @@ _die "$rc seems to be for older gitolite" if defined($GL_ADMINDIR); # let values specified in rc file override our internal ones @rc{ keys %RC } = values %RC; + # testing sometimes requires all of it to be overridden silently; use an + # env var that is highly unlikely to appear in real life :) + do $ENV{G3T_RC} if exists $ENV{G3T_RC} and -r $ENV{G3T_RC}; + # fix PATH (TODO: do it only if 'gitolite' isn't in PATH) $ENV{PATH} = "$ENV{GL_BINDIR}:$ENV{PATH}";