From 713815df143802ac304f5bd4374afc7efcce97c1 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 26 Mar 2014 17:24:53 +0200 Subject: [PATCH] Skip git hooks if oldrev or newrev is nil Signed-off-by: Dmitriy Zaporozhets --- lib/gitlab/git_access.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/gitlab/git_access.rb b/lib/gitlab/git_access.rb index 0f33217460..4ca9b157f7 100644 --- a/lib/gitlab/git_access.rb +++ b/lib/gitlab/git_access.rb @@ -58,6 +58,8 @@ module Gitlab def pass_git_hooks?(user, project, ref, oldrev, newrev) return true unless project.git_hook + return true unless newrev && oldrev + git_hook = project.git_hook # Prevent tag removal