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
Léo-Paul Géneau
gitlab-ce
Commits
4147a2db
Commit
4147a2db
authored
Jul 24, 2018
by
Jacob Vosmaer (GitLab)
Committed by
Sean McGivern
Jul 24, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Annotate Gitlab::Git::Repository#fetch_ref
parent
34c57e09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+4
-0
lib/gitlab/import_export/merge_request_parser.rb
lib/gitlab/import_export/merge_request_parser.rb
+1
-0
No files found.
lib/gitlab/git/repository.rb
View file @
4147a2db
...
...
@@ -826,6 +826,10 @@ module Gitlab
end
end
# This method, fetch_ref, is used from within
# Gitlab::Git::OperationService. OperationService will eventually only
# exist in gitaly-ruby. When we delete OperationService from gitlab-ce
# we can also remove fetch_ref.
def
fetch_ref
(
source_repository
,
source_ref
:,
target_ref
:)
Gitlab
::
Git
.
check_namespace!
(
source_repository
)
source_repository
=
RemoteRepository
.
new
(
source_repository
)
unless
source_repository
.
is_a?
(
RemoteRepository
)
...
...
lib/gitlab/import_export/merge_request_parser.rb
View file @
4147a2db
...
...
@@ -25,6 +25,7 @@ module Gitlab
@project
.
repository
.
create_branch
(
@merge_request
.
target_branch
,
@merge_request
.
target_branch_sha
)
end
# Gitaly migration: https://gitlab.com/gitlab-org/gitaly/issues/1295
def
fetch_ref
@project
.
repository
.
fetch_ref
(
@project
.
repository
,
source_ref:
@diff_head_sha
,
target_ref:
@merge_request
.
source_branch
)
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