Commit 48ca2dc6 authored by Douwe Maan's avatar Douwe Maan

Remove oldrev and newrev nil-checks that are now unnecessary

parent 3a0ae96c
......@@ -18,12 +18,16 @@ module Gitlab
private
def creation?
Gitlab::Git.blank_ref?(oldrev)
end
def deletion?
Gitlab::Git.blank_ref?(newrev)
end
def update?
!Gitlab::Git.blank_ref?(oldrev) && !deletion?
!creation? && !deletion?
end
def updated_from_web?
......
......@@ -11,7 +11,7 @@ module Gitlab
}.freeze
def validate!
return if deletion? || newrev.nil?
return if deletion?
return unless should_run_diff_validations?
return if commits.empty?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment