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
cc82ea99
Commit
cc82ea99
authored
Sep 06, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix repository ff_merge method
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
f6325757
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
app/models/repository.rb
app/models/repository.rb
+1
-1
spec/ee/spec/models/ee/merge_request_spec.rb
spec/ee/spec/models/ee/merge_request_spec.rb
+6
-0
No files found.
app/models/repository.rb
View file @
cc82ea99
...
...
@@ -864,7 +864,7 @@ class Repository
raise
'Invalid merge target'
if
our_commit
.
nil?
raise
'Invalid merge source'
if
their_commit
.
nil?
Gitlab
::
Git
::
OperationService
.
new
(
user
,
raw_repository
).
with_branch
(
target_branch
)
do
|
start_commit
|
with_branch
(
user
,
target_branch
)
do
|
start_commit
|
merge_request
&
.
update
(
in_progress_merge_commit_sha:
their_commit
.
oid
)
their_commit
.
oid
...
...
spec/ee/spec/models/ee/merge_request_spec.rb
View file @
cc82ea99
...
...
@@ -38,6 +38,9 @@ describe MergeRequest do
end
describe
'#rebase_in_progress?'
do
# Create merge request and project before we stub file calls
before
{
subject
}
it
'returns true when there is a current rebase directory'
do
allow
(
File
).
to
receive
(
:exist?
).
and_return
(
true
)
allow
(
File
).
to
receive
(
:mtime
).
and_return
(
Time
.
now
)
...
...
@@ -69,6 +72,9 @@ describe MergeRequest do
end
describe
'#squash_in_progress?'
do
# Create merge request and project before we stub file calls
before
{
subject
}
it
'returns true when there is a current squash directory'
do
allow
(
File
).
to
receive
(
:exist?
).
and_return
(
true
)
allow
(
File
).
to
receive
(
:mtime
).
and_return
(
Time
.
now
)
...
...
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