debian-mirror-gitlab/lib/gitlab/git/attributes_at_ref_parser.rb
2019-02-13 22:33:31 +05:30

16 lines
360 B
Ruby

# 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