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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
48a0e9f6
Commit
48a0e9f6
authored
Apr 09, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
1817f877
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
5 deletions
+8
-5
app/controllers/projects/compare_controller.rb
app/controllers/projects/compare_controller.rb
+0
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+6
-4
app/helpers/diff_helper.rb
app/helpers/diff_helper.rb
+2
-0
No files found.
app/controllers/projects/compare_controller.rb
View file @
48a0e9f6
...
@@ -61,7 +61,6 @@ class Projects::CompareController < Projects::ApplicationController
...
@@ -61,7 +61,6 @@ class Projects::CompareController < Projects::ApplicationController
@environment
=
EnvironmentsFinder
.
new
(
@project
,
current_user
,
environment_params
).
execute
.
last
@environment
=
EnvironmentsFinder
.
new
(
@project
,
current_user
,
environment_params
).
execute
.
last
@diff_notes_disabled
=
true
@diff_notes_disabled
=
true
@grouped_diff_discussions
=
{}
end
end
end
end
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
48a0e9f6
...
@@ -122,7 +122,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -122,7 +122,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
build_merge_request
build_merge_request
@diffs
=
@merge_request
.
diffs
(
diff_options
)
@diffs
=
@merge_request
.
diffs
(
diff_options
)
@diff_notes_disabled
=
true
@diff_notes_disabled
=
true
@grouped_diff_discussions
=
{}
end
end
define_commit_vars
define_commit_vars
...
@@ -576,10 +575,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -576,10 +575,13 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@comparable_diffs
=
@merge_request_diffs
.
select
{
|
diff
|
diff
.
id
<
@merge_request_diff
.
id
}
@comparable_diffs
=
@merge_request_diffs
.
select
{
|
diff
|
diff
.
id
<
@merge_request_diff
.
id
}
if
params
[
:start_sha
].
present?
if
params
[
:start_sha
].
present?
start_sha
=
params
[
:start_sha
]
@
start_sha
=
params
[
:start_sha
]
@start_version
=
@comparable_diffs
.
find
{
|
diff
|
diff
.
head_commit_sha
==
start_sha
}
@start_version
=
@comparable_diffs
.
find
{
|
diff
|
diff
.
head_commit_sha
==
@
start_sha
}
@start_sha
=
start_sha
if
@start_version
unless
@start_version
@start_sha
=
@merge_request_diff
.
head_commit_sha
@start_version
=
@merge_request_diff
end
end
end
@diffs
=
@diffs
=
...
...
app/helpers/diff_helper.rb
View file @
48a0e9f6
...
@@ -62,6 +62,8 @@ module DiffHelper
...
@@ -62,6 +62,8 @@ module DiffHelper
end
end
def
parallel_diff_discussions
(
left
,
right
,
diff_file
)
def
parallel_diff_discussions
(
left
,
right
,
diff_file
)
return
unless
@grouped_diff_discussions
discussions_left
=
discussions_right
=
nil
discussions_left
=
discussions_right
=
nil
if
left
&&
(
left
.
unchanged?
||
left
.
removed?
)
if
left
&&
(
left
.
unchanged?
||
left
.
removed?
)
...
...
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