Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-12-12 01:05:11 +0300
committerStan Hu <stanhu@gmail.com>2018-12-12 01:05:11 +0300
commitc8aaf15cec1dc576afb375131f4239351da93d54 (patch)
tree6a7862e12e4a3ab127f77485dad0bd307e2bdab6 /lib
parent0ad135629f181518b230a1bed4111b2999f7d333 (diff)
parent1e4b6cd8e6857555bd3635ba9bd9dce937676cd2 (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
Diffstat (limited to 'lib')
-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?