gitlab-org--gitlab-foss/app/models/concerns/blob_language_from_git_attributes.rb

12 lines
237 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module BlobLanguageFromGitAttributes
extend ActiveSupport::Concern
def language_from_gitattributes
return unless repository&.exists?
repository.gitattribute(path, 'gitlab-language')
end
end