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
0a3548df
Commit
0a3548df
authored
Feb 27, 2020
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Pass keep_divergent_refs in RemoteMirror#update_repository
parent
d926e01b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
0 deletions
+22
-0
app/models/remote_mirror.rb
app/models/remote_mirror.rb
+2
-0
spec/models/remote_mirror_spec.rb
spec/models/remote_mirror_spec.rb
+20
-0
No files found.
app/models/remote_mirror.rb
View file @
0a3548df
...
...
@@ -117,6 +117,8 @@ class RemoteMirror < ApplicationRecord
end
end
options
[
:keep_divergent_refs
]
=
keep_divergent_refs?
Gitlab
::
Git
::
RemoteMirror
.
new
(
project
.
repository
.
raw
,
remote_name
,
...
...
spec/models/remote_mirror_spec.rb
View file @
0a3548df
...
...
@@ -142,6 +142,26 @@ describe RemoteMirror, :mailer do
end
end
describe
'#update_repository'
do
let
(
:git_remote_mirror
)
{
spy
}
before
do
stub_const
(
'Gitlab::Git::RemoteMirror'
,
git_remote_mirror
)
end
it
'includes the `keep_divergent_refs` setting'
do
mirror
=
build_stubbed
(
:remote_mirror
,
keep_divergent_refs:
true
)
mirror
.
update_repository
({})
expect
(
git_remote_mirror
).
to
have_received
(
:new
).
with
(
anything
,
mirror
.
remote_name
,
hash_including
(
keep_divergent_refs:
true
)
)
end
end
describe
'#safe_url'
do
context
'when URL contains credentials'
do
it
'masks the credentials'
do
...
...
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