summaryrefslogtreecommitdiff
path: root/hooks/pre-receive
diff options
context:
space:
mode:
Diffstat (limited to 'hooks/pre-receive')
-rwxr-xr-xhooks/pre-receive6
1 files changed, 3 insertions, 3 deletions
diff --git a/hooks/pre-receive b/hooks/pre-receive
index 58a628b..7ee81a4 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, repo_path)
+def increase_reference_counter(gl_repository)
result = GitlabNet.new.pre_receive(gl_repository)
result['reference_counter_increased']
@@ -23,9 +23,9 @@ require_relative '../lib/gitlab_net'
# last so that it only runs if everything else succeeded. On post-receive on the
# other hand, we run GitlabPostReceive first because the push is already done
# 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 &&
+if GitlabAccess.new(gl_repository, key_id, refs, protocol).exec &&
GitlabCustomHook.new(repo_path, key_id).pre_receive(refs) &&
- increase_reference_counter(gl_repository, repo_path)
+ increase_reference_counter(gl_repository)
exit 0
else
exit 1