Commit c8aaf15c authored by Stan Hu's avatar Stan Hu

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
parents 0ad13562 1e4b6cd8
...@@ -11,6 +11,7 @@ module Gitlab ...@@ -11,6 +11,7 @@ module Gitlab
}.freeze }.freeze
def validate! def validate!
return if deletion? || newrev.nil?
return unless should_run_diff_validations? return unless should_run_diff_validations?
return if commits.empty? return if commits.empty?
return unless uses_raw_delta_validations? return unless uses_raw_delta_validations?
...@@ -28,7 +29,7 @@ module Gitlab ...@@ -28,7 +29,7 @@ module Gitlab
private private
def should_run_diff_validations? def should_run_diff_validations?
newrev && oldrev && !deletion? && validate_lfs_file_locks? validate_lfs_file_locks?
end end
def validate_lfs_file_locks? def validate_lfs_file_locks?
......
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