diff options
author | Stan Hu <stanhu@gmail.com> | 2018-12-12 01:05:11 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-12-12 01:05:11 +0300 |
commit | c8aaf15cec1dc576afb375131f4239351da93d54 (patch) | |
tree | 6a7862e12e4a3ab127f77485dad0bd307e2bdab6 | |
parent | 0ad135629f181518b230a1bed4111b2999f7d333 (diff) | |
parent | 1e4b6cd8e6857555bd3635ba9bd9dce937676cd2 (diff) |
Merge branch 'sh-fix-diff-check-issue-55137-ce' into 'master'
[CE] Fix DiffCheck failing due to invalid string argument
See merge request gitlab-org/gitlab-ce!23741
-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? |