Commit af20d781 authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Remove feature gate

parent 2bac2918
...@@ -978,29 +978,8 @@ module Gitlab ...@@ -978,29 +978,8 @@ module Gitlab
end end
def languages(ref = nil) def languages(ref = nil)
gitaly_migrate(:commit_languages, status: Gitlab::GitalyClient::MigrationStatus::OPT_OUT) do |is_enabled| wrapped_gitaly_errors do
if is_enabled
gitaly_commit_client.languages(ref) gitaly_commit_client.languages(ref)
else
ref ||= rugged.head.target_id
languages = Linguist::Repository.new(rugged, ref).languages
total = languages.map(&:last).sum
languages = languages.map do |language|
name, share = language
color = Linguist::Language[name].color || "##{Digest::SHA256.hexdigest(name)[0...6]}"
{
value: (share.to_f * 100 / total).round(2),
label: name,
color: color,
highlight: color
}
end
languages.sort do |x, y|
y[:value] <=> x[:value]
end
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment