summaryrefslogtreecommitdiff
path: root/lib/api/entities.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-29 14:29:59 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-29 14:29:59 +0300
commit2f780af2462d71164c2e11bc6147f87400303a64 (patch)
tree047adc70de5967401a2258480043b3fdd4c53ab3 /lib/api/entities.rb
parent027fcc0512accb81043e81d4f7b9a06a3f0fa12f (diff)
downloadgitlab-ce-2f780af2462d71164c2e11bc6147f87400303a64.tar.gz
Git::Compare does not have limit param any more
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r--lib/api/entities.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index 09fb97abf29..238416c5379 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -201,13 +201,13 @@ module API
class Compare < Grape::Entity
expose :commit, using: Entities::RepoCommit do |compare, options|
- if compare.commit
- Commit.new compare.commit
- end
+ Commit.decorate(compare.commits).last
end
+
expose :commits, using: Entities::RepoCommit do |compare, options|
- Commit.decorate compare.commits
+ Commit.decorate(compare.commits)
end
+
expose :diffs, using: Entities::RepoDiff do |compare, options|
compare.diffs
end