Skip git hooks if oldrev or newrev is nil

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
Dmitriy Zaporozhets
2014-03-26 17:24:53 +02:00
parent 67e942cc16
commit 713815df14
+2
View File
@@ -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