Welcome to mirror list, hosted at ThFree Co, Russian Federation.

push_options.rb « git « gitlab « lib « ruby - gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: a3829cc9db02be6d41712d1313c1d7a1399bc127 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# frozen_string_literal: true

module Gitlab
  module Git
    class PushOptions
      attr_accessor :options

      def initialize(options)
        @options = options
      end

      def env_data
        return {} if options.empty?

        data = {
          'GIT_PUSH_OPTION_COUNT' => options.count.to_s
        }

        options.each_with_index do |opt, index|
          data["GIT_PUSH_OPTION_#{index}"] = opt
        end

        data
      end
    end
  end
end