2018-03-17 18:26:18 +05:30
|
|
|
module Gitlab
|
|
|
|
module Git
|
|
|
|
class RemoteMirror
|
2018-12-13 13:39:08 +05:30
|
|
|
include Gitlab::Git::WrapsGitalyErrors
|
|
|
|
|
2019-01-03 12:48:30 +05:30
|
|
|
def initialize(repository, ref_name)
|
2018-03-17 18:26:18 +05:30
|
|
|
@repository = repository
|
|
|
|
@ref_name = ref_name
|
|
|
|
end
|
|
|
|
|
2019-01-03 12:48:30 +05:30
|
|
|
def update(only_branches_matching: [])
|
2018-12-13 13:39:08 +05:30
|
|
|
wrapped_gitaly_errors do
|
2019-01-03 12:48:30 +05:30
|
|
|
@repository.gitaly_remote_client.update_remote_mirror(@ref_name, only_branches_matching)
|
2018-03-17 18:26:18 +05:30
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|