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

11 lines
644 B
Plaintext
Raw Normal View History

2012-05-31 12:16:34 +01:00
- commit_id = pull_diff.deleted_file ? @base_commit.id : @head_commit.id
.file
%a{:name => h(pull_diff.a_path)}
.top
2012-06-07 20:19:18 +01:00
.l= h(pull_diff.renamed_file ? "#{pull_diff.a_path.reverse.truncate(60, :separator => '/').reverse} -> #{pull_diff.b_path.reverse.truncate(60, :separator => '/').reverse}" : pull_diff.a_path.reverse.truncate(120, :separator => '/').reverse)
2012-05-31 12:16:34 +01:00
- if pull_diff.b_path.present?
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@project, commit_id, pull_diff.b_path)
.clear
.diff_data= render_diff(pull_diff) unless (Git::Repository.new(@pull.path).tree(commit_id) / pull_diff.b_path).binary?