debian-mirror-gitlab/app/models/concerns/blob_language_from_git_attributes.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
237 B
Ruby
Raw Normal View History

2018-12-13 13:39:08 +05:30
# frozen_string_literal: true
module BlobLanguageFromGitAttributes
extend ActiveSupport::Concern
def language_from_gitattributes
2020-04-08 14:13:33 +05:30
return unless repository&.exists?
2018-12-13 13:39:08 +05:30
repository.gitattribute(path, 'gitlab-language')
end
end