summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlejandro Rodríguez <alejorro70@gmail.com>2018-08-09 23:18:49 -0400
committerAlejandro Rodríguez <alejorro70@gmail.com>2018-08-17 13:22:38 -0300
commit4b87d80499eb5c4fc89aee8cadf6c4ee4112dfc8 (patch)
treefded00c33284a3c43c1fe80a837db17359642d9b /lib
parenta58d0a0182d06efbbde57821e71c305518325d6f (diff)
downloadgitlab-ce-4b87d80499eb5c4fc89aee8cadf6c4ee4112dfc8.tar.gz
Fix merge requests not showing any diff files for big patches49907-commits-and-merge-requests-does-not-list-all-files-when-one-file-exceeds-size-limits
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/git/diff.rb1
-rw-r--r--lib/gitlab/gitaly_client/diff.rb2
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/gitlab/git/diff.rb b/lib/gitlab/git/diff.rb
index b58296375ef..61ce10ca131 100644
--- a/lib/gitlab/git/diff.rb
+++ b/lib/gitlab/git/diff.rb
@@ -226,6 +226,7 @@ module Gitlab
@new_file = diff.from_id == BLANK_SHA
@renamed_file = diff.from_path != diff.to_path
@deleted_file = diff.to_id == BLANK_SHA
+ @too_large = diff.too_large if diff.respond_to?(:too_large)
collapse! if diff.respond_to?(:collapsed) && diff.collapsed
end
diff --git a/lib/gitlab/gitaly_client/diff.rb b/lib/gitlab/gitaly_client/diff.rb
index d98a0ce988f..af9d674535b 100644
--- a/lib/gitlab/gitaly_client/diff.rb
+++ b/lib/gitlab/gitaly_client/diff.rb
@@ -1,7 +1,7 @@
module Gitlab
module GitalyClient
class Diff
- ATTRS = %i(from_path to_path old_mode new_mode from_id to_id patch overflow_marker collapsed).freeze
+ ATTRS = %i(from_path to_path old_mode new_mode from_id to_id patch overflow_marker collapsed too_large).freeze
include AttributesBag
end