diff options
author | Stan Hu <stanhu@gmail.com> | 2018-01-13 00:10:55 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-01-13 00:50:23 -0800 |
commit | 69535c142303145c0c20b6dc6480e5a77ff3801d (patch) | |
tree | 6bc08790db1d7f1bb52241ff7f993d8d57a816e8 /hooks | |
parent | a478813e1e0c792733ef4a7639d8191bd20a0261 (diff) | |
download | gitlab-shell-sh-remove-reference-counter.tar.gz |
Remove remaining artifacts of reference countersh-remove-reference-counter
Closes gitlab-org/gitlab-qa#158
Diffstat (limited to 'hooks')
-rwxr-xr-x | hooks/pre-receive | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/hooks/pre-receive b/hooks/pre-receive index d113697..72e3d7d 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -9,24 +9,12 @@ protocol = ENV.delete('GL_PROTOCOL') repo_path = Dir.pwd gl_repository = ENV['GL_REPOSITORY'] -def increase_reference_counter(gl_repository, repo_path) - result = GitlabNet.new.pre_receive(gl_repository) - - result['reference_counter_increased'] -end - require_relative '../lib/gitlab_custom_hook' -require_relative '../lib/gitlab_reference_counter' require_relative '../lib/gitlab_access' require_relative '../lib/gitlab_net' -# It's important that on pre-receive `increase_reference_counter` gets executed -# 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 && - GitlabCustomHook.new(repo_path, key_id).pre_receive(refs) && - increase_reference_counter(gl_repository, repo_path) + GitlabCustomHook.new(repo_path, key_id).pre_receive(refs) exit 0 else exit 1 |