Display renamed files in diff views

Show both the old and new filenames when viewing the diff for a renamed
file.
This commit is contained in:
Vinnie Okada 2014-10-06 21:42:07 -05:00
parent d790b2cbb8
commit 0084b8a776

View file

@ -10,7 +10,10 @@
- if @commit.parent_ids.present? - if @commit.parent_ids.present?
= view_file_btn(@commit.parent_id, diff_file, project) = view_file_btn(@commit.parent_id, diff_file, project)
- else - else
%span= diff_file.new_path - if diff_file.renamed_file
%span= "#{diff_file.old_path} renamed to #{diff_file.new_path}"
- else
%span= diff_file.new_path
- if diff_file.mode_changed? - if diff_file.mode_changed?
%span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}" %span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}"