diff options
author | micael.bergeron <micael.bergeron@solutionstlm.com> | 2017-09-03 07:45:44 -0400 |
---|---|---|
committer | micael.bergeron <micael.bergeron@solutionstlm.com> | 2017-09-06 09:01:53 -0400 |
commit | bca72f5906ed38dc231ef066231238758c1cb42d (patch) | |
tree | dcb5e33639aea203cc824a46ff82aaeb7b7c8b86 /lib/api | |
parent | b97f9629cabadca1125351a8aa514791524dea3f (diff) | |
download | gitlab-ce-bca72f5906ed38dc231ef066231238758c1cb42d.tar.gz |
wip: fake its a binary diff
Diffstat (limited to 'lib/api')
-rw-r--r-- | lib/api/commits.rb | 2 | ||||
-rw-r--r-- | lib/api/entities.rb | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/api/commits.rb b/lib/api/commits.rb index ea78737288a..4b8d248f5f7 100644 --- a/lib/api/commits.rb +++ b/lib/api/commits.rb @@ -104,7 +104,7 @@ module API not_found! 'Commit' unless commit - commit.raw_diffs.to_a + present commit.raw_diffs.to_a, with: Entities::RepoDiff end desc "Get a commit's comments" do diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 9114b69606b..0c63dc345c2 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -291,10 +291,11 @@ module API end class RepoDiff < Grape::Entity - expose :old_path, :new_path, :a_mode, :b_mode, :diff + expose :old_path, :new_path, :a_mode, :b_mode expose :new_file?, as: :new_file expose :renamed_file?, as: :renamed_file expose :deleted_file?, as: :deleted_file + expose :diff end class ProtectedRefAccess < Grape::Entity |