Remove oldrev and newrev nil-checks that are now unnecessary
This commit is contained in:
parent
3a0ae96c0e
commit
48ca2dc6e1
|
@ -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?
|
||||
|
||||
|
|
Loading…
Reference in New Issue