Skip to content
Snippets Groups Projects
Verified Commit 054d68a3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Improve MR message for huge diffs

parent 49506fc7
No related branches found
No related tags found
No related merge requests found
Loading
@@ -93,6 +93,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
Loading
@@ -93,6 +93,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
   
diff_line_count = Commit::diff_line_count(@diffs) diff_line_count = Commit::diff_line_count(@diffs)
@suppress_diff = Commit::diff_suppress?(@diffs, diff_line_count) @suppress_diff = Commit::diff_suppress?(@diffs, diff_line_count)
@force_suppress_diff = @suppress_diff
end end
end end
   
Loading
Loading
Loading
@@ -11,12 +11,13 @@
Loading
@@ -11,12 +11,13 @@
= link_to "plain diff", project_commit_path(@project, @commit, format: :diff), class: "underlined-link" = link_to "plain diff", project_commit_path(@project, @commit, format: :diff), class: "underlined-link"
or or
= link_to "email patch", project_commit_path(@project, @commit, format: :patch), class: "underlined-link" = link_to "email patch", project_commit_path(@project, @commit, format: :patch), class: "underlined-link"
instead.
- elsif @merge_request && @merge_request.persisted? - elsif @merge_request && @merge_request.persisted?
Please, download the diff as Please, download the diff as
= link_to "plain diff", project_merge_request_path(@project, @merge_request, format: :diff), class: "underlined-link" = link_to "plain diff", project_merge_request_path(@project, @merge_request, format: :diff), class: "underlined-link"
or or
= link_to "email patch", project_merge_request_path(@project, @merge_request, format: :patch), class: "underlined-link" = link_to "email patch", project_merge_request_path(@project, @merge_request, format: :patch), class: "underlined-link"
instead. instead.
- unless @force_suppress_diff - unless @force_suppress_diff
%p %p
If you still want to see the diff If you still want to see the diff
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment