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
Jérome Perrin
gitlab-ce
Commits
c6ff7bfa
Commit
c6ff7bfa
authored
Jun 25, 2018
by
Alejandro Rodríguez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move git calls for `Repository#update_branch` inside Gitlab::Git
This prepares this code for migration to Gitaly.
parent
dd949b0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+5
-2
No files found.
lib/gitlab/git/repository.rb
View file @
c6ff7bfa
...
@@ -684,6 +684,10 @@ module Gitlab
...
@@ -684,6 +684,10 @@ module Gitlab
end
end
end
end
def
update_branch
(
branch_name
,
user
:,
newrev
:,
oldrev
:)
OperationService
.
new
(
user
,
self
).
update_branch
(
branch_name
,
newrev
,
oldrev
)
end
def
rm_branch
(
branch_name
,
user
:)
def
rm_branch
(
branch_name
,
user
:)
gitaly_migrate
(
:operation_user_delete_branch
,
status:
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
do
|
is_enabled
|
gitaly_migrate
(
:operation_user_delete_branch
,
status:
Gitlab
::
GitalyClient
::
MigrationStatus
::
OPT_OUT
)
do
|
is_enabled
|
if
is_enabled
if
is_enabled
...
@@ -1953,8 +1957,7 @@ module Gitlab
...
@@ -1953,8 +1957,7 @@ module Gitlab
rebase_sha
=
run_git!
(
%w(rev-parse HEAD)
,
chdir:
rebase_path
,
env:
env
).
strip
rebase_sha
=
run_git!
(
%w(rev-parse HEAD)
,
chdir:
rebase_path
,
env:
env
).
strip
Gitlab
::
Git
::
OperationService
.
new
(
user
,
self
)
update_branch
(
branch
,
user:
user
,
newrev:
rebase_sha
,
oldrev:
branch_sha
)
.
update_branch
(
branch
,
rebase_sha
,
branch_sha
)
rebase_sha
rebase_sha
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