rosa-build/app/views/projects/pull_requests/_pull_diff.html.haml

10 lines
583 B
Plaintext

- commit_id = pull_diff.deleted_file ? @pull.to_commit.id : @pull.from_commit.id
.file
%a{:name => "diff-#{pull_diff_counter}"}
.top
.l= h(pull_diff.renamed_file ? "#{pull_diff.a_path.rtruncate 60}=>#{pull_diff.b_path.rtruncate 60}" : pull_diff.b_path.rtruncate(120))
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@project, commit_id, pull_diff.b_path)
.clear
-if pull_diff.diff.present? && !(@pull.repo.tree(commit_id) / pull_diff.b_path).binary?
.diff_data=render_diff(pull_diff, :diff_counter => pull_diff_counter, :comments => @comments)