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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
59e18195
Commit
59e18195
authored
Jun 13, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply soft diff limits to MergeRequest#new page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
04e8b518
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+3
-0
app/views/projects/commits/_diffs.html.haml
app/views/projects/commits/_diffs.html.haml
+3
-2
No files found.
app/controllers/projects/merge_requests_controller.rb
View file @
59e18195
...
...
@@ -90,6 +90,9 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request
.
title
=
@merge_request
.
source_branch
.
titleize
.
humanize
@target_project
=
@merge_request
.
target_project
@target_repo
=
@target_project
.
repository
diff_line_count
=
Commit
::
diff_line_count
(
@diffs
)
@suppress_diff
=
Commit
::
diff_suppress?
(
@diffs
,
diff_line_count
)
end
end
...
...
app/views/projects/commits/_diffs.html.haml
View file @
59e18195
...
...
@@ -6,12 +6,13 @@
%p
To preserve performance the diff is not shown.
-
if
current_controller?
(
:commit
)
or
current_controller?
(
:merge_requests
)
Please, download the diff as
-
if
current_controller?
(
:commit
)
Please, download the diff as
=
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"
-
else
-
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"
...
...
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