From 4a2fcc7cf28353975aeb2177572f23dcf35fa5bd Mon Sep 17 00:00:00 2001 From: Kezio Date: Wed, 27 Jul 2016 21:10:52 -0300 Subject: [PATCH] Revert commit "Unset GL_ID and GL_PROTOCOL immediately" Those variables are very useful with custom_hooks scripts. --- hooks/pre-receive | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hooks/pre-receive b/hooks/pre-receive index 09fa42b7..16c659db 100755 --- a/hooks/pre-receive +++ b/hooks/pre-receive @@ -4,8 +4,8 @@ # will be processed properly. refs = $stdin.read -key_id = ENV.delete('GL_ID') -protocol = ENV.delete('GL_PROTOCOL') +key_id = ENV['GL_ID'] +protocol = ENV['GL_PROTOCOL'] repo_path = Dir.pwd require_relative '../lib/gitlab_custom_hook' @@ -21,5 +21,7 @@ if GitlabAccess.new(repo_path, key_id, refs, protocol).exec && GitlabReferenceCounter.new(repo_path).increase exit 0 else + ENV['GL_ID'] = nil + exit 1 end -- GitLab