diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-07-15 09:04:18 +0200 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2016-07-18 14:43:28 -0600 |
commit | a404ab380db5959ab22b09bc586607b1f6c507cd (patch) | |
tree | 68cadd8516a1db0997dfa09e8fafd12b35391d78 /app/views/projects/diffs/_content.html.haml | |
parent | 65352b5baaf269a609b024fd13efc81e8bbdcefa (diff) | |
download | gitlab-ce-a404ab380db5959ab22b09bc586607b1f6c507cd.tar.gz |
Collapsed diffs lines/size don't accumulate to overflow diffs.19820-safer-diffs
Diffstat (limited to 'app/views/projects/diffs/_content.html.haml')
-rw-r--r-- | app/views/projects/diffs/_content.html.haml | 10 |
1 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 0c0424edffd..a1b071f130c 100644 --- a/app/views/projects/diffs/_content.html.haml +++ b/app/views/projects/diffs/_content.html.haml @@ -8,12 +8,12 @@ - elsif blob_text_viewable?(blob) - if !project.repository.diffable?(blob) .nothing-here-block This diff was suppressed by a .gitattributes entry. + - elsif diff_file.collapsed? + - url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path)) + .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_file.collapsed_by_default? && !expand_all_diffs? - - url = url_for(params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path)) - .nothing-here-block.diff-collapsed{data: { diff_for_path: url } } - This diff is collapsed. Click to expand it. - - elsif diff_view == 'parallel' + - 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 |