add GL_REPO to the environment variables

When a slave receives a mirror push (git-receive-pack), set the GL_REPO
environment variable so that custom hooks can use it.
This commit is contained in:
Georges Discry 2011-12-02 02:13:13 +01:00
parent d08aca63ff
commit 35ac093742

View file

@ -118,6 +118,7 @@ if ($soc =~ /^git-receive-pack '(\S+)'$/) {
print STDERR "$GL_HOSTNAME <=== ($repo) ==== $sender\n";
$ENV{GL_BYPASS_UPDATE_HOOK} = 1;
$ENV{GL_REPO} = $repo;
# replace the repo path with the full path and hand off to git-shell
$soc =~ s(')('$ENV{GL_REPO_BASE_ABS}/);
exec("git", "shell", "-c", $soc);