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
bb054ae5
Commit
bb054ae5
authored
Oct 07, 2017
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CE->EE: remove duplicated methods from automatic merge
parent
25130343
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
47 deletions
+0
-47
app/models/project.rb
app/models/project.rb
+0
-28
app/models/repository.rb
app/models/repository.rb
+0
-19
No files found.
app/models/project.rb
View file @
bb054ae5
...
...
@@ -1621,34 +1621,6 @@ class Project < ActiveRecord::Base
Gitlab
::
GlRepository
.
gl_repository
(
self
,
is_wiki
)
end
def
merge_method
if
self
.
merge_requests_ff_only_enabled
:ff
elsif
self
.
merge_requests_rebase_enabled
:rebase_merge
else
:merge
end
end
def
merge_method
=
(
method
)
case
method
.
to_s
when
"ff"
self
.
merge_requests_ff_only_enabled
=
true
self
.
merge_requests_rebase_enabled
=
true
when
"rebase_merge"
self
.
merge_requests_ff_only_enabled
=
false
self
.
merge_requests_rebase_enabled
=
true
when
"merge"
self
.
merge_requests_ff_only_enabled
=
false
self
.
merge_requests_rebase_enabled
=
false
end
end
def
ff_merge_must_be_possible?
self
.
merge_requests_ff_only_enabled
||
self
.
merge_requests_rebase_enabled
end
private
def
storage
...
...
app/models/repository.rb
View file @
bb054ae5
...
...
@@ -848,25 +848,6 @@ class Repository
end
end
def
ff_merge
(
user
,
source
,
target_branch
,
merge_request:
nil
)
our_commit
=
rugged
.
branches
[
target_branch
].
target
their_commit
=
if
source
.
is_a?
(
Gitlab
::
Git
::
Commit
)
source
.
raw_commit
else
rugged
.
lookup
(
source
)
end
raise
'Invalid merge target'
if
our_commit
.
nil?
raise
'Invalid merge source'
if
their_commit
.
nil?
with_branch
(
user
,
target_branch
)
do
|
start_commit
|
merge_request
&
.
update
(
in_progress_merge_commit_sha:
their_commit
.
oid
)
their_commit
.
oid
end
end
def
merge
(
user
,
source_sha
,
merge_request
,
message
)
with_cache_hooks
do
raw_repository
.
merge
(
user
,
source_sha
,
merge_request
.
target_branch
,
message
)
do
|
commit_id
|
...
...
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