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
e9955331
Commit
e9955331
authored
Jul 03, 2016
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix EE for new diff notes
parent
7927695b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
4 additions
and
14 deletions
+4
-14
app/models/merge_request.rb
app/models/merge_request.rb
+1
-5
app/services/merge_requests/ff_merge_service.rb
app/services/merge_requests/ff_merge_service.rb
+1
-1
features/steps/project/ff_merge_requests.rb
features/steps/project/ff_merge_requests.rb
+2
-2
spec/models/merge_request_spec.rb
spec/models/merge_request_spec.rb
+0
-6
No files found.
app/models/merge_request.rb
View file @
e9955331
...
...
@@ -679,12 +679,8 @@ class MergeRequest < ActiveRecord::Base
end
end
def
source_sha_parent
source_project
.
repository
.
commit
(
first_commit
.
sha
).
parents
.
first
.
sha
end
def
ff_merge_possible?
project
.
repository
.
is_ancestor?
(
target_
sha
,
source
_sha
)
project
.
repository
.
is_ancestor?
(
target_
branch_sha
,
diff_head
_sha
)
end
def
should_be_rebased?
...
...
app/services/merge_requests/ff_merge_service.rb
View file @
e9955331
...
...
@@ -9,7 +9,7 @@ module MergeRequests
private
def
commit
repository
.
ff_merge
(
current_user
,
merge_request
.
source
_sha
,
merge_request
.
target_branch
)
repository
.
ff_merge
(
current_user
,
merge_request
.
diff_head
_sha
,
merge_request
.
target_branch
)
end
end
end
features/steps/project/ff_merge_requests.rb
View file @
e9955331
...
...
@@ -54,14 +54,14 @@ class Spinach::Features::ProjectFfMergeRequests < Spinach::FeatureSteps
step
'merge request "Bug NS-05" is rebased'
do
merge_request
.
source_branch
=
'flatten-dir'
merge_request
.
target_branch
=
'improve/awesome'
merge_request
.
reload_
code
merge_request
.
reload_
diff
merge_request
.
save!
end
step
'merge request "Bug NS-05" merged target'
do
merge_request
.
source_branch
=
'merged-target'
merge_request
.
target_branch
=
'improve/awesome'
merge_request
.
reload_
code
merge_request
.
reload_
diff
merge_request
.
save!
end
...
...
spec/models/merge_request_spec.rb
View file @
e9955331
...
...
@@ -335,12 +335,6 @@ describe MergeRequest, models: true do
end
end
describe
"#source_sha_parent"
do
it
"returns the sha of the parent commit of the first commit in the MR"
do
expect
(
subject
.
source_sha_parent
).
to
eq
(
"ae73cb07c9eeaf35924a10f713b364d32b2dd34f"
)
end
end
describe
'#diverged_commits_count'
do
let
(
:project
)
{
create
(
:project
)
}
let
(
:fork_project
)
{
create
(
:project
,
forked_from_project:
project
)
}
...
...
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