2017-12-18 23:58:20 +00:00
|
|
|
module Gitlab
|
|
|
|
module Git
|
|
|
|
class RemoteMirror
|
2018-10-30 13:37:40 +00:00
|
|
|
include Gitlab::Git::WrapsGitalyErrors
|
|
|
|
|
2017-12-18 23:58:20 +00:00
|
|
|
def initialize(repository, ref_name)
|
|
|
|
@repository = repository
|
|
|
|
@ref_name = ref_name
|
|
|
|
end
|
|
|
|
|
2018-01-17 23:25:16 +00:00
|
|
|
def update(only_branches_matching: [])
|
2018-10-30 13:37:40 +00:00
|
|
|
wrapped_gitaly_errors do
|
2018-06-25 09:37:24 +00:00
|
|
|
@repository.gitaly_remote_client.update_remote_mirror(@ref_name, only_branches_matching)
|
2017-12-18 23:58:20 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|