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
59dd9e57
Commit
59dd9e57
authored
Aug 30, 2016
by
Sean McGivern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Repository#fetch_ref
parent
1bda1e62
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
app/services/merge_requests/resolve_service.rb
app/services/merge_requests/resolve_service.rb
+7
-2
No files found.
app/services/merge_requests/resolve_service.rb
View file @
59dd9e57
...
@@ -38,8 +38,13 @@ module MergeRequests
...
@@ -38,8 +38,13 @@ module MergeRequests
def
fetch_their_commit!
def
fetch_their_commit!
return
if
rugged
.
include?
(
conflicts
.
their_commit
.
oid
)
return
if
rugged
.
include?
(
conflicts
.
their_commit
.
oid
)
remote
=
rugged
.
remotes
.
create_anonymous
(
merge_request
.
target_project
.
repository
.
path_to_repo
)
random_string
=
SecureRandom
.
hex
remote
.
fetch
(
merge_request
.
target_branch
)
project
.
repository
.
fetch_ref
(
merge_request
.
target_project
.
repository
.
path_to_repo
,
"refs/heads/
#{
merge_request
.
target_branch
}
"
,
"refs/tmp/
#{
random_string
}
/head"
)
end
end
end
end
end
end
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