summaryrefslogtreecommitdiff
path: root/lib/gitlab/git/remote_mirror.rb
blob: 7f9520de5ce2904db9cb39f4f766ff1fbbbedebd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
module Gitlab
  module Git
    class RemoteMirror
      include Gitlab::Git::WrapsGitalyErrors

      def initialize(repository, ref_name)
        @repository = repository
        @ref_name = ref_name
      end

      def update(only_branches_matching: [])
        wrapped_gitaly_errors do
          @repository.gitaly_remote_client.update_remote_mirror(@ref_name, only_branches_matching)
        end
      end
    end
  end
end