Commit bee2bcc5 authored by Douwe Maan's avatar Douwe Maan

Merge branch '108-pre-receive-undefined-variable' into 'master'

pre-receive: Fix undefined local variable error

Closes #108

See merge request gitlab-org/gitlab-shell!169
parents 47924c46 2d581970
v5.9.2
- Fix pre-receive error when gitlab doesn't have /internal/pre_receive (!169)
v5.9.1
- Adds --force option to push branches
......
......@@ -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