summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-12-11 22:05:11 +0000
committerAlex Hanselka <alex@gitlab.com>2018-12-11 14:07:23 -0800
commit63acce291a7c588da2252f980aa660cbf5f7b65c (patch)
tree3cf14bb01923b8a494b909b50b23f637f3f0e4ef
parent4abe49f13cac4b57750f8dc53a5a9db28214380d (diff)
downloadgitlab-ce-63acce291a7c588da2252f980aa660cbf5f7b65c.tar.gz
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.rb3
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?