summaryrefslogtreecommitdiff
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
parenta58d0a0182d06efbbde57821e71c305518325d6f (diff)
downloadgitlab-ce-49907-commits-and-merge-requests-does-not-list-all-files-when-one-file-exceeds-size-limits.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
-rw-r--r--GITALY_SERVER_VERSION2
-rw-r--r--Gemfile2
-rw-r--r--Gemfile.lock4
-rw-r--r--Gemfile.rails5.lock6
-rw-r--r--changelogs/unreleased/49907-commits-and-merge-requests-does-not-list-all-files-when-one-file-exceeds-size-limits.yml5
-rw-r--r--lib/gitlab/git/diff.rb1
-rw-r--r--lib/gitlab/gitaly_client/diff.rb2
-rw-r--r--spec/lib/gitlab/gitaly_client/diff_spec.rb6
8 files changed, 19 insertions, 9 deletions
diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION
index 90bdef2ea8c..377d8aca07e 100644
--- a/GITALY_SERVER_VERSION
+++ b/GITALY_SERVER_VERSION
@@ -1 +1 @@
-0.117.1
+0.117.2
diff --git a/Gemfile b/Gemfile
index 5666e6cebc5..f01adaddd68 100644
--- a/Gemfile
+++ b/Gemfile
@@ -423,7 +423,7 @@ group :ed25519 do
end
# Gitaly GRPC client
-gem 'gitaly-proto', '~> 0.112.0', require: 'gitaly'
+gem 'gitaly-proto', '~> 0.113.0', require: 'gitaly'
gem 'grpc', '~> 1.11.0'
# Locked until https://github.com/google/protobuf/issues/4210 is closed
diff --git a/Gemfile.lock b/Gemfile.lock
index 1aadc3fd0b6..333e586949f 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -284,7 +284,7 @@ GEM
gettext_i18n_rails (>= 0.7.1)
po_to_json (>= 1.0.0)
rails (>= 3.2.0)
- gitaly-proto (0.112.0)
+ gitaly-proto (0.113.0)
google-protobuf (~> 3.1)
grpc (~> 1.10)
github-linguist (5.3.3)
@@ -1045,7 +1045,7 @@ DEPENDENCIES
gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.3)
- gitaly-proto (~> 0.112.0)
+ gitaly-proto (~> 0.113.0)
github-linguist (~> 5.3.3)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-gollum-lib (~> 4.2)
diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock
index af70e2c1939..c919f1a08ae 100644
--- a/Gemfile.rails5.lock
+++ b/Gemfile.rails5.lock
@@ -287,7 +287,7 @@ GEM
gettext_i18n_rails (>= 0.7.1)
po_to_json (>= 1.0.0)
rails (>= 3.2.0)
- gitaly-proto (0.112.0)
+ gitaly-proto (0.113.0)
google-protobuf (~> 3.1)
grpc (~> 1.10)
github-linguist (5.3.3)
@@ -1057,7 +1057,7 @@ DEPENDENCIES
gettext (~> 3.2.2)
gettext_i18n_rails (~> 1.8.0)
gettext_i18n_rails_js (~> 1.3)
- gitaly-proto (~> 0.112.0)
+ gitaly-proto (~> 0.113.0)
github-linguist (~> 5.3.3)
gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-gollum-lib (~> 4.2)
@@ -1216,4 +1216,4 @@ DEPENDENCIES
wikicloth (= 0.8.1)
BUNDLED WITH
- 1.16.2
+ 1.16.3
diff --git a/changelogs/unreleased/49907-commits-and-merge-requests-does-not-list-all-files-when-one-file-exceeds-size-limits.yml b/changelogs/unreleased/49907-commits-and-merge-requests-does-not-list-all-files-when-one-file-exceeds-size-limits.yml
new file mode 100644
index 00000000000..2fce00a662f
--- /dev/null
+++ b/changelogs/unreleased/49907-commits-and-merge-requests-does-not-list-all-files-when-one-file-exceeds-size-limits.yml
@@ -0,0 +1,5 @@
+---
+title: Fix merge requests not showing any diff files for big patches
+merge_request: 21125
+author:
+type: fixed
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
diff --git a/spec/lib/gitlab/gitaly_client/diff_spec.rb b/spec/lib/gitlab/gitaly_client/diff_spec.rb
index 00a31ac0b96..ec7ab2fdedb 100644
--- a/spec/lib/gitlab/gitaly_client/diff_spec.rb
+++ b/spec/lib/gitlab/gitaly_client/diff_spec.rb
@@ -9,7 +9,9 @@ describe Gitlab::GitalyClient::Diff do
new_mode: 0100644,
from_id: '357406f3075a57708d0163752905cc1576fceacc',
to_id: '8e5177d718c561d36efde08bad36b43687ee6bf0',
- patch: 'a' * 100
+ patch: 'a' * 100,
+ collapsed: false,
+ too_large: false
}
end
@@ -22,6 +24,8 @@ describe Gitlab::GitalyClient::Diff do
it { is_expected.to respond_to(:from_id) }
it { is_expected.to respond_to(:to_id) }
it { is_expected.to respond_to(:patch) }
+ it { is_expected.to respond_to(:collapsed) }
+ it { is_expected.to respond_to(:too_large) }
describe '#==' do
it { expect(subject).to eq(described_class.new(diff_fields)) }