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:
authorDouwe Maan <douwe@selenight.nl>2017-05-31 05:48:30 +0300
committerDouwe Maan <douwe@selenight.nl>2017-05-31 05:48:30 +0300
commitce869e3964a40b4cf04a803f5201d940ad61b13c (patch)
tree826985092006a35e03d923c9b002db936d8c9894 /lib
parentd9461314ada3135593a53ba61a73dd695ee3a38d (diff)
Fix Diff#too_large? and specs
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/diff.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/gitlab/git/diff.rb b/lib/gitlab/git/diff.rb
index e33fe4b305a..2462f766f17 100644
--- a/lib/gitlab/git/diff.rb
+++ b/lib/gitlab/git/diff.rb
@@ -230,9 +230,11 @@ module Gitlab
end
def too_large?
- return @too_large if defined?(@too_large)
-
- @too_large = @diff.bytesize >= SIZE_LIMIT
+ if @too_large.nil?
+ @too_large = @diff.bytesize >= SIZE_LIMIT
+ else
+ @too_large
+ end
end
def too_large!