summaryrefslogtreecommitdiff
path: root/lib/api
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-25 13:58:20 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-09-25 13:58:20 +0000
commit3a72af480d5a89a0cf5fd27e65e473c49e63eaad (patch)
tree283ce8045df34394b32a674ad4f82123669d2b1d /lib/api
parent9cd5ff043a72001201b4c8192a45f8029ebe84ac (diff)
parenteaeb4a90d431ff5e1e6156c10f3118f70c3c4f8e (diff)
downloadgitlab-ce-3a72af480d5a89a0cf5fd27e65e473c49e63eaad.tar.gz
Merge branch 'use-more-rugged' into 'master'
Make GitLab CE works with new gitlab_git Recently we removed grit dependency from `gitlab_git` in favor of rugged. This changes make GitLab works with new library. See merge request !194
Diffstat (limited to 'lib/api')
-rw-r--r--lib/api/branches.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb
index 75783628e3d..14f8b20f6b2 100644
--- a/lib/api/branches.rb
+++ b/lib/api/branches.rb
@@ -14,7 +14,7 @@ module API
# Example Request:
# GET /projects/:id/repository/branches
get ":id/repository/branches" do
- present user_project.repo.heads.sort_by(&:name), with: Entities::RepoObject, project: user_project
+ present user_project.repository.branches.sort_by(&:name), with: Entities::RepoObject, project: user_project
end
# Get a single branch
@@ -25,7 +25,7 @@ module API
# Example Request:
# GET /projects/:id/repository/branches/:branch
get ':id/repository/branches/:branch', requirements: { branch: /.*/ } do
- @branch = user_project.repo.heads.find { |item| item.name == params[:branch] }
+ @branch = user_project.repository.branches.find { |item| item.name == params[:branch] }
not_found!("Branch does not exist") if @branch.nil?
present @branch, with: Entities::RepoObject, project: user_project
end