diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-26 12:08:36 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-11-26 12:08:36 +0300 |
commit | 23d237110e6a646dec08e1f5b4696d2d9c51cfef (patch) | |
tree | 3c568514c8e22203f50d38940cbb9865aad5bb02 /app/serializers/diff_file_metadata_entity.rb | |
parent | 274dff4f027da636f62361c811285cbb5d5a7c0c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers/diff_file_metadata_entity.rb')
-rw-r--r-- | app/serializers/diff_file_metadata_entity.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/app/serializers/diff_file_metadata_entity.rb b/app/serializers/diff_file_metadata_entity.rb index 500a844b170..05280518f39 100644 --- a/app/serializers/diff_file_metadata_entity.rb +++ b/app/serializers/diff_file_metadata_entity.rb @@ -7,4 +7,7 @@ class DiffFileMetadataEntity < Grape::Entity expose :old_path expose :new_file?, as: :new_file expose :deleted_file?, as: :deleted_file + expose :file_hash do |diff_file| + Digest::SHA1.hexdigest(diff_file.file_path) + end end |