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 ...@@ -18,12 +18,16 @@ module Gitlab
private private
def creation?
Gitlab::Git.blank_ref?(oldrev)
end
def deletion? def deletion?
Gitlab::Git.blank_ref?(newrev) Gitlab::Git.blank_ref?(newrev)
end end
def update? def update?
!Gitlab::Git.blank_ref?(oldrev) && !deletion? !creation? && !deletion?
end end
def updated_from_web? def updated_from_web?
......
...@@ -11,7 +11,7 @@ module Gitlab ...@@ -11,7 +11,7 @@ module Gitlab
}.freeze }.freeze
def validate! def validate!
return if deletion? || newrev.nil? return if deletion?
return unless should_run_diff_validations? return unless should_run_diff_validations?
return if commits.empty? 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