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
Kazuhiko Shiozaki
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
end
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
@commit
=
compare
.
commit
@diffs
=
compare
.
diffs
@refs_are_same
=
compare
.
same
@line_notes
=
[]
@diff_timeout
=
compare
.
timeout
compare_result
=
CompareService
.
new
.
execute
(
current_user
,
@project
,
base_ref
,
@project
,
head_ref
)
@commits
=
compare_result
.
commits
@diffs
=
compare_result
.
diffs
@commit
=
@commits
.
last
@line_notes
=
[]
end
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