gitlab-org--gitlab-foss/lib/gitlab/git/attributes_at_ref_parser.rb
2018-01-24 05:15:37 +00:00

14 lines
329 B
Ruby

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