Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
af20d781
Commit
af20d781
authored
Jun 25, 2018
by
Zeger-Jan van de Weg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove feature gate
parent
2bac2918
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
23 deletions
+2
-23
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+2
-23
No files found.
lib/gitlab/git/repository.rb
View file @
af20d781
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment