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

attributes_at_ref_parser.rb « git « gitlab « lib - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cbddf836ce8f312669f612c9c069e83ff1d8fa5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

module Gitlab
  module Git
    # Parses root .gitattributes file at a given ref
    class AttributesAtRefParser
      delegate :attributes, to: :@parser

      def initialize(repository, ref)
        blob = repository.blob_at(ref, '.gitattributes')

        @parser = AttributesParser.new(blob&.data)
      end
    end
  end
end