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
0ba0f9de
Commit
0ba0f9de
authored
Jan 03, 2018
by
Ahmad Sherif
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prepare Gitlab::Git::Repository#rebase for Gitaly migration
parent
a0ae8861
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
lib/gitlab/git/operation_service.rb
lib/gitlab/git/operation_service.rb
+5
-0
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+8
-1
No files found.
lib/gitlab/git/operation_service.rb
View file @
0ba0f9de
...
...
@@ -97,6 +97,11 @@ module Gitlab
end
end
def
update_branch
(
branch_name
,
newrev
,
oldrev
)
ref
=
Gitlab
::
Git
::
BRANCH_REF_PREFIX
+
branch_name
update_ref_in_hooks
(
ref
,
newrev
,
oldrev
)
end
private
# Returns [newrev, should_run_after_create, should_run_after_create_branch]
...
...
lib/gitlab/git/repository.rb
View file @
0ba0f9de
...
...
@@ -1212,9 +1212,16 @@ module Gitlab
rebase_path
=
worktree_path
(
REBASE_WORKTREE_PREFIX
,
rebase_id
)
env
=
git_env_for_user
(
user
)
if
remote_repository
.
is_a?
(
RemoteRepository
)
env
.
merge!
(
remote_repository
.
fetch_env
)
remote_repo_path
=
GITALY_INTERNAL_URL
else
remote_repo_path
=
remote_repository
.
path
end
with_worktree
(
rebase_path
,
branch
,
env:
env
)
do
run_git!
(
%W(pull --rebase
#{
remote_repo
sitory
.
path
}
#{
remote_branch
}
)
,
%W(pull --rebase
#{
remote_repo
_
path
}
#{
remote_branch
}
)
,
chdir:
rebase_path
,
env:
env
)
...
...
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