Merge branch 'master' into fixes/api

This commit is contained in:
Sebastian Ziebell 2013-02-13 10:31:06 +01:00
commit 375caeefcf
29 changed files with 224 additions and 94 deletions

View file

@ -265,6 +265,7 @@ module Gitlab
# GET /projects/:id/repository/branches/:branch
get ":id/repository/branches/:branch" do
@branch = user_project.repo.heads.find { |item| item.name == params[:branch] }
not_found!("Branch does not exist") if @branch.nil?
present @branch, with: Entities::RepoObject, project: user_project
end