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

blob_language_from_git_attributes.rb « concerns « models « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 70213d22147107fb61234f0d75c8d434dd800022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
# frozen_string_literal: true

# Applicable for blob classes with project attribute
module BlobLanguageFromGitAttributes
  extend ActiveSupport::Concern

  def language_from_gitattributes
    return nil unless project

    repository = project.repository
    repository.gitattribute(path, 'gitlab-language')
  end
end