diff options
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/diffs/_content.html.haml | 9 | ||||
-rw-r--r-- | app/views/projects/diffs/_text_file.html.haml | 1 |
2 files changed, 5 insertions, 5 deletions
diff --git a/app/views/projects/diffs/_content.html.haml b/app/views/projects/diffs/_content.html.haml index d37961c4e40..8af44021cb4 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -13,10 +13,11 @@ .nothing-here-block.diff-collapsed{data: { diff_for_path: url } } This diff is collapsed. Click to expand it. - elsif diff_file.diff_lines.length > 0 - - if diff_view == :parallel - = render "projects/diffs/parallel_view", diff_file: diff_file, project: project, blob: blob - - else - = render "projects/diffs/text_file", diff_file: diff_file + = cache_if(diff_file_content_cacheable?(diff_file), diff_file_content_cache_key(diff_file, diff_view), skip_digest: true) do + - if diff_view == :parallel + = render "projects/diffs/parallel_view", diff_file: diff_file + - else + = render "projects/diffs/text_file", diff_file: diff_file - else - if diff_file.mode_changed? .nothing-here-block File mode changed diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index f1d2d4bf268..2a8bdc6916c 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -4,7 +4,6 @@ %a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show. %table.text-file.code.js-syntax-highlight{ data: diff_view_data, class: too_big ? 'hide' : '' } - - last_line = 0 - discussions = @grouped_diff_discussions unless @diff_notes_disabled = render partial: "projects/diffs/line", collection: diff_file.highlighted_diff_lines, |