diff options
author | Vinnie Okada <vokada@mrvinn.com> | 2014-10-06 21:42:07 -0500 |
---|---|---|
committer | Vinnie Okada <vokada@mrvinn.com> | 2014-10-06 21:42:07 -0500 |
commit | 0084b8a7763b04f432579e5a19ce0c6a06136b03 (patch) | |
tree | b40beb2020625426d45bc44834e4e9e7a2112502 | |
parent | d790b2cbb814a429268361cf6f3198e7ffb938d8 (diff) | |
download | gitlab-ce-0084b8a7763b04f432579e5a19ce0c6a06136b03.tar.gz |
Display renamed files in diff views
Show both the old and new filenames when viewing the diff for a renamed
file.
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index c415ae2ddc8..bf7770ceedf 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -10,7 +10,10 @@ - if @commit.parent_ids.present? = view_file_btn(@commit.parent_id, diff_file, project) - 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? %span.file-mode= "#{diff_file.diff.a_mode} → #{diff_file.diff.b_mode}" |