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:
parent
d08aca63ff
commit
35ac093742
|
@ -118,6 +118,7 @@ if ($soc =~ /^git-receive-pack '(\S+)'$/) {
|
||||||
print STDERR "$GL_HOSTNAME <=== ($repo) ==== $sender\n";
|
print STDERR "$GL_HOSTNAME <=== ($repo) ==== $sender\n";
|
||||||
|
|
||||||
$ENV{GL_BYPASS_UPDATE_HOOK} = 1;
|
$ENV{GL_BYPASS_UPDATE_HOOK} = 1;
|
||||||
|
$ENV{GL_REPO} = $repo;
|
||||||
# replace the repo path with the full path and hand off to git-shell
|
# replace the repo path with the full path and hand off to git-shell
|
||||||
$soc =~ s(')('$ENV{GL_REPO_BASE_ABS}/);
|
$soc =~ s(')('$ENV{GL_REPO_BASE_ABS}/);
|
||||||
exec("git", "shell", "-c", $soc);
|
exec("git", "shell", "-c", $soc);
|
||||||
|
|
Loading…
Reference in a new issue