diff options
Diffstat (limited to 'lib/gitlab/checks/diff_check.rb')
-rw-r--r-- | lib/gitlab/checks/diff_check.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/checks/diff_check.rb b/lib/gitlab/checks/diff_check.rb index 49d361fcef7..8ee345ab45a 100644 --- a/lib/gitlab/checks/diff_check.rb +++ b/lib/gitlab/checks/diff_check.rb @@ -11,6 +11,7 @@ module Gitlab }.freeze def validate! + return if deletion? || newrev.nil? return unless should_run_diff_validations? return if commits.empty? return unless uses_raw_delta_validations? @@ -28,7 +29,7 @@ module Gitlab private def should_run_diff_validations? - newrev && oldrev && !deletion? && validate_lfs_file_locks? + validate_lfs_file_locks? end def validate_lfs_file_locks? |