diff options
author | Douwe Maan <douwe@selenight.nl> | 2016-01-29 19:37:17 +0100 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-01-29 19:37:17 +0100 |
commit | 677b4db9e682b29bb15dddb84fe80b976490a671 (patch) | |
tree | a0cfa62dd011bfe897d01ad0ef87540d4ccc23a9 /app/views/projects/diffs/_file.html.haml | |
parent | e221990ebac72b8b229b8c3ff38069edbf7776a7 (diff) | |
download | gitlab-ce-677b4db9e682b29bb15dddb84fe80b976490a671.tar.gz |
Mark inline difference between old and new paths when a file is renamed
Diffstat (limited to 'app/views/projects/diffs/_file.html.haml')
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index fc0eaef2286..3ac058a3bf8 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -7,16 +7,20 @@ = submodule_link(blob, @commit.id, project.repository) - else = blob_icon blob.mode, blob.name - = link_to "#diff-#{i}" do - %strong - = diff_file.new_path - - if diff_file.deleted_file - deleted - - elsif diff_file.renamed_file - renamed from - %strong - = diff_file.old_path + = link_to "#diff-#{i}" do + - if diff_file.renamed_file + - old_path, new_path = mark_inline_diffs(diff_file.old_path, diff_file.new_path) + %strong.filename.old + = old_path + → + %strong.filename.new + = new_path + - else + %strong + = diff_file.new_path + - if diff_file.deleted_file + deleted - if diff_file.mode_changed? %small |