Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
054d68a3
Commit
054d68a3
authored
Jun 14, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve MR message for huge diffs
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
49506fc7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-0
app/views/projects/commits/_diffs.html.haml
app/views/projects/commits/_diffs.html.haml
+2
-1
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
054d68a3
...
...
@@ -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
...
...
app/views/projects/commits/_diffs.html.haml
View file @
054d68a3
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment