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
3c0e3b8a
Commit
3c0e3b8a
authored
Feb 27, 2020
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add keep_divergent_refs to GitalyClient::RemoteService
The option defaults to false to match existing behavior.
parent
fcc03152
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
lib/gitlab/gitaly_client/remote_service.rb
lib/gitlab/gitaly_client/remote_service.rb
+2
-1
spec/lib/gitlab/gitaly_client/remote_service_spec.rb
spec/lib/gitlab/gitaly_client/remote_service_spec.rb
+1
-1
No files found.
lib/gitlab/gitaly_client/remote_service.rb
View file @
3c0e3b8a
...
@@ -53,7 +53,7 @@ module Gitlab
...
@@ -53,7 +53,7 @@ module Gitlab
encode_utf8
(
response
.
ref
)
encode_utf8
(
response
.
ref
)
end
end
def
update_remote_mirror
(
ref_name
,
only_branches_matching
,
ssh_key:
nil
,
known_hosts:
nil
)
def
update_remote_mirror
(
ref_name
,
only_branches_matching
,
ssh_key:
nil
,
known_hosts:
nil
,
keep_divergent_refs:
false
)
req_enum
=
Enumerator
.
new
do
|
y
|
req_enum
=
Enumerator
.
new
do
|
y
|
first_request
=
Gitaly
::
UpdateRemoteMirrorRequest
.
new
(
first_request
=
Gitaly
::
UpdateRemoteMirrorRequest
.
new
(
repository:
@gitaly_repo
,
repository:
@gitaly_repo
,
...
@@ -62,6 +62,7 @@ module Gitlab
...
@@ -62,6 +62,7 @@ module Gitlab
first_request
.
ssh_key
=
ssh_key
if
ssh_key
.
present?
first_request
.
ssh_key
=
ssh_key
if
ssh_key
.
present?
first_request
.
known_hosts
=
known_hosts
if
known_hosts
.
present?
first_request
.
known_hosts
=
known_hosts
if
known_hosts
.
present?
first_request
.
keep_divergent_refs
=
keep_divergent_refs
y
.
yield
(
first_request
)
y
.
yield
(
first_request
)
...
...
spec/lib/gitlab/gitaly_client/remote_service_spec.rb
View file @
3c0e3b8a
...
@@ -66,7 +66,7 @@ describe Gitlab::GitalyClient::RemoteService do
...
@@ -66,7 +66,7 @@ describe Gitlab::GitalyClient::RemoteService do
.
with
(
kind_of
(
Enumerator
),
kind_of
(
Hash
))
.
with
(
kind_of
(
Enumerator
),
kind_of
(
Hash
))
.
and_return
(
double
(
:update_remote_mirror_response
))
.
and_return
(
double
(
:update_remote_mirror_response
))
client
.
update_remote_mirror
(
ref_name
,
only_branches_matching
,
ssh_key:
ssh_key
,
known_hosts:
known_hosts
)
client
.
update_remote_mirror
(
ref_name
,
only_branches_matching
,
ssh_key:
ssh_key
,
known_hosts:
known_hosts
,
keep_divergent_refs:
true
)
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