Commit 054d68a3e9092f21d407dc39b784dece8c935bfe
1 parent
49506fc7
Exists in
spb-stable
and in
2 other branches
Improve MR message for huge diffs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
2 changed files
with
3 additions
and
1 deletions
Show diff stats
app/controllers/projects/merge_requests_controller.rb
... | ... | @@ -93,6 +93,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController |
93 | 93 | |
94 | 94 | diff_line_count = Commit::diff_line_count(@diffs) |
95 | 95 | @suppress_diff = Commit::diff_suppress?(@diffs, diff_line_count) |
96 | + @force_suppress_diff = @suppress_diff | |
96 | 97 | end |
97 | 98 | end |
98 | 99 | ... | ... |
app/views/projects/commits/_diffs.html.haml
... | ... | @@ -11,12 +11,13 @@ |
11 | 11 | = link_to "plain diff", project_commit_path(@project, @commit, format: :diff), class: "underlined-link" |
12 | 12 | or |
13 | 13 | = link_to "email patch", project_commit_path(@project, @commit, format: :patch), class: "underlined-link" |
14 | + instead. | |
14 | 15 | - elsif @merge_request && @merge_request.persisted? |
15 | 16 | Please, download the diff as |
16 | 17 | = link_to "plain diff", project_merge_request_path(@project, @merge_request, format: :diff), class: "underlined-link" |
17 | 18 | or |
18 | 19 | = link_to "email patch", project_merge_request_path(@project, @merge_request, format: :patch), class: "underlined-link" |
19 | - instead. | |
20 | + instead. | |
20 | 21 | - unless @force_suppress_diff |
21 | 22 | %p |
22 | 23 | If you still want to see the diff | ... | ... |