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
Tatuya Kamada
gitlab-ce
Commits
378a3f5c
Commit
378a3f5c
authored
Jul 29, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use CompareService for compare page
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
098ee55e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
app/controllers/projects/compare_controller.rb
app/controllers/projects/compare_controller.rb
+14
-7
No files found.
app/controllers/projects/compare_controller.rb
View file @
378a3f5c
...
@@ -8,14 +8,21 @@ class Projects::CompareController < Projects::ApplicationController
...
@@ -8,14 +8,21 @@ class Projects::CompareController < Projects::ApplicationController
end
end
def
show
def
show
compare
=
Gitlab
::
Git
::
Compare
.
new
(
@repository
.
raw_repository
,
params
[
:from
],
params
[
:to
],
MergeRequestDiff
::
COMMITS_SAFE_SIZE
)
base_ref
=
params
[
:from
]
head_ref
=
params
[
:to
]
@commits
=
compare
.
commits
compare_result
=
CompareService
.
new
.
execute
(
@commit
=
compare
.
commit
current_user
,
@diffs
=
compare
.
diffs
@project
,
@refs_are_same
=
compare
.
same
base_ref
,
@line_notes
=
[]
@project
,
@diff_timeout
=
compare
.
timeout
head_ref
)
@commits
=
compare_result
.
commits
@diffs
=
compare_result
.
diffs
@commit
=
@commits
.
last
@line_notes
=
[]
end
end
def
create
def
create
...
...
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