From 1d3f03fb69111e25a33ccb7f66582904ad0371f8 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 1 Oct 2013 18:26:55 +0300 Subject: Fix blob and repo stuff after gitlab_git v3 --- lib/api/repositories.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/api') diff --git a/lib/api/repositories.rb b/lib/api/repositories.rb index c2b229b0172..1a911eae2bb 100644 --- a/lib/api/repositories.rb +++ b/lib/api/repositories.rb @@ -139,7 +139,7 @@ module API path = params[:path] || nil commit = user_project.repository.commit(ref) - tree = Tree.new(user_project.repository, commit.id, ref, path) + tree = Tree.new(user_project.repository, commit.id, path) trees = [] @@ -168,8 +168,8 @@ module API commit = repo.commit(ref) not_found! "Commit" unless commit - blob = Gitlab::Git::Blob.new(repo, commit.id, ref, params[:filepath]) - not_found! "File" unless blob.exists? + blob = Gitlab::Git::Blob.find(repo, commit.id, params[:filepath]) + not_found! "File" unless blob env['api.format'] = :txt -- cgit v1.2.1