Commit eb4d5795 authored by Jonathon Reinhart's avatar Jonathon Reinhart

pre-receive: Fix undefined local variable error

This was broken during the refactor in c658360e.
parent 47924c46
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment