diff options
| author | Douwe Maan <douwe@selenight.nl> | 2017-05-30 21:48:30 -0500 |
|---|---|---|
| committer | Douwe Maan <douwe@selenight.nl> | 2017-05-30 21:48:30 -0500 |
| commit | ce869e3964a40b4cf04a803f5201d940ad61b13c (patch) | |
| tree | 826985092006a35e03d923c9b002db936d8c9894 /lib | |
| parent | d9461314ada3135593a53ba61a73dd695ee3a38d (diff) | |
| download | gitlab-ce-ce869e3964a40b4cf04a803f5201d940ad61b13c.tar.gz | |
Fix Diff#too_large? and specs
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/gitlab/git/diff.rb | 8 |
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! |
