diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-14 12:58:08 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-14 12:58:08 +0300 |
commit | 054d68a3e9092f21d407dc39b784dece8c935bfe (patch) | |
tree | c1ce1bde57bb620b86822853eeef25b830959894 | |
parent | 49506fc71a03e39a1a316e6740423a44030526ed (diff) | |
download | gitlab-ce-054d68a3e9092f21d407dc39b784dece8c935bfe.tar.gz |
Improve MR message for huge diffs
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 1 | ||||
-rw-r--r-- | app/views/projects/commits/_diffs.html.haml | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index f8447691d6d..1abedc1f272 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -93,6 +93,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController diff_line_count = Commit::diff_line_count(@diffs) @suppress_diff = Commit::diff_suppress?(@diffs, diff_line_count) + @force_suppress_diff = @suppress_diff end end diff --git a/app/views/projects/commits/_diffs.html.haml b/app/views/projects/commits/_diffs.html.haml index ed95a30bc7e..3d7b5974144 100644 --- a/app/views/projects/commits/_diffs.html.haml +++ b/app/views/projects/commits/_diffs.html.haml @@ -11,12 +11,13 @@ = link_to "plain diff", project_commit_path(@project, @commit, format: :diff), class: "underlined-link" or = link_to "email patch", project_commit_path(@project, @commit, format: :patch), class: "underlined-link" + instead. - elsif @merge_request && @merge_request.persisted? Please, download the diff as = link_to "plain diff", project_merge_request_path(@project, @merge_request, format: :diff), class: "underlined-link" or = link_to "email patch", project_merge_request_path(@project, @merge_request, format: :patch), class: "underlined-link" - instead. + instead. - unless @force_suppress_diff %p If you still want to see the diff |