[refs #90] fix diff

This commit is contained in:
Alexander Machehin 2012-05-10 18:32:54 +06:00
parent d4a5b78b21
commit 4040a486fe
2 changed files with 5 additions and 4 deletions

View File

@ -16,10 +16,12 @@ class Projects::PullRequestsController < Projects::BaseController
@pull.base_ref = @pull.base_project.default_branch
@pull.head_ref = params[:treeish].presence || @pull.head_project.default_branch
@base_commit = @pull.base_project.git_repository.commits(@base_ref).first
@head_commit = @pull.head_project.git_repository.commits(@head_ref).first
@pull.check
#@pull.save
repo = Git::Repository.new(@pull.path)
@base_commit = repo.commits(@pull.base_ref).first
@head_commit = repo.commits(@pull.head_ref).first
@diff = Grit::Repo.new(@pull.path).diff @base_commit, @head_commit
end

View File

@ -32,7 +32,6 @@
.rightlist=f.submit t('.submit'), :class => 'btn btn-primary disabled', 'data-loading-text' => t('layout.processing'), :id => 'create_pull'
.both
#diff.tab-pane
=@head_commit
-begin
=# render_commit_stats(stats)