Use Gitlab::Git:: for git features across application

This commit is contained in:
Dmitriy Zaporozhets 2013-04-01 16:04:35 +03:00
parent bb06e905ef
commit 49b024f5f5
11 changed files with 32 additions and 64 deletions

View file

@ -8,7 +8,6 @@ class BlameController < ProjectResourceController
before_filter :require_non_empty_project
def show
@repo = @project.repo
@blame = Grit::Blob.blame(@repo, @commit.id, @path)
@blame = Gitlab::Git::Blame.new(project.repository, @commit.id, @path)
end
end

View file

@ -8,12 +8,12 @@ class CompareController < ProjectResourceController
end
def show
result = Commit.compare(project, params[:from], params[:to])
compare = Gitlab::Git::Compare.new(project.repository, params[:from], params[:to])
@commits = result[:commits]
@commit = result[:commit]
@diffs = result[:diffs]
@refs_are_same = result[:same]
@commits = compare.commits
@commit = compare.commit
@diffs = compare.diffs
@refs_are_same = compare.same
@line_notes = []
end