summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathon Reinhart <Jonathon.Reinhart@gmail.com>2017-09-21 21:41:27 -0400
committerJonathon Reinhart <Jonathon.Reinhart@gmail.com>2017-09-21 21:41:27 -0400
commiteb4d5795e100e5186bc88c30fc501048b40e92b0 (patch)
tree4c066864a58e28581b85c64887025da554c02b08
parent47924c460a288ab145c4448e8a6be7eea70a8a6d (diff)
downloadgitlab-shell-eb4d5795e100e5186bc88c30fc501048b40e92b0.tar.gz
pre-receive: Fix undefined local variable error
This was broken during the refactor in c658360e94.
-rwxr-xr-xhooks/pre-receive4
1 files changed, 2 insertions, 2 deletions
diff --git a/hooks/pre-receive b/hooks/pre-receive
index 78ff991..d7fecc7 100755
--- a/hooks/pre-receive
+++ b/hooks/pre-receive
@@ -9,7 +9,7 @@ protocol = ENV.delete('GL_PROTOCOL')
repo_path = Dir.pwd
gl_repository = ENV['GL_REPOSITORY']
-def increase_reference_counter(gl_repository)
+def increase_reference_counter(gl_repository, repo_path)
result = GitlabNet.new.pre_receive(gl_repository)
result['reference_counter_increased']
@@ -28,7 +28,7 @@ require_relative '../lib/gitlab_net'
# and we don't want to skip it if the custom hook fails.
if GitlabAccess.new(gl_repository, repo_path, key_id, refs, protocol).exec &&
GitlabCustomHook.new(repo_path, key_id).pre_receive(refs) &&
- increase_reference_counter(gl_repository)
+ increase_reference_counter(gl_repository, repo_path)
exit 0
else
exit 1