pull diff small refactoring

This commit is contained in:
Alexander Machehin 2013-06-24 20:54:50 +06:00
parent dcde3aa369
commit eb9ce47723
2 changed files with 3 additions and 3 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@ crash.log
config/newrelic.yml config/newrelic.yml
config/deploy/*.rb config/deploy/*.rb
config/deploy.rb config/deploy.rb
*.swo

View File

@ -2,9 +2,8 @@
.file .file
%a{:name => "diff-#{pull_diff_counter}"} %a{:name => "diff-#{pull_diff_counter}"}
.top .top
.l= h(pull_diff.renamed_file ? "#{pull_diff.a_path.rtruncate 60} -> #{pull_diff.b_path.rtruncate 60}" : pull_diff.a_path.rtruncate(120)) .l= h(pull_diff.renamed_file ? "#{pull_diff.a_path.rtruncate 60}=>#{pull_diff.b_path.rtruncate 60}" : pull_diff.b_path.rtruncate(120))
- 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)
.r= link_to "view file @ #{short_hash_id(commit_id)}", blob_path(@project, commit_id, pull_diff.b_path)
.clear .clear
-if pull_diff.diff.present? && !(@pull.repo.tree(commit_id) / pull_diff.b_path).binary? -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) .diff_data=render_diff(pull_diff, :diff_counter => pull_diff_counter, :comments => @comments)