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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-29 15:06:40 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-29 15:06:40 +0300
commitd64e3a8b281d355c7d51d04df52fab407b8cc76d (patch)
tree282d6cc62eacd3fb4a0f6841ae52ae4a709e303f /app/serializers/diff_file_base_entity.rb
parent833eadad8cac85b99871842854c9a676a607e2da (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers/diff_file_base_entity.rb')
-rw-r--r--app/serializers/diff_file_base_entity.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/serializers/diff_file_base_entity.rb b/app/serializers/diff_file_base_entity.rb
index ee68b4b98e0..302fe3d7c67 100644
--- a/app/serializers/diff_file_base_entity.rb
+++ b/app/serializers/diff_file_base_entity.rb
@@ -89,6 +89,14 @@ class DiffFileBaseEntity < Grape::Entity
expose :viewer, using: DiffViewerEntity
+ expose :old_size do |diff_file|
+ diff_file.old_blob&.raw_size
+ end
+
+ expose :new_size do |diff_file|
+ diff_file.new_blob&.raw_size
+ end
+
private
def memoized_submodule_links(diff_file, options)