diff options
author | Josh Frye <joshfng@gmail.com> | 2016-05-25 16:57:20 -0400 |
---|---|---|
committer | Josh Frye <joshfng@gmail.com> | 2016-05-25 17:16:42 -0400 |
commit | 6d2a0a6b9b97570b07c3b3aec74c6420b1919403 (patch) | |
tree | d8e9ac1d8a89564fb468745f403f4bf235e392ef /app | |
parent | 49343f9a31ffdcf4ff238189bbf58e581e41d102 (diff) | |
download | gitlab-ce-6d2a0a6b9b97570b07c3b3aec74c6420b1919403.tar.gz |
Remove main_language and testsremove-main-language
Diffstat (limited to 'app')
-rw-r--r-- | app/models/repository.rb | 6 | ||||
-rw-r--r-- | app/services/git_push_service.rb | 17 | ||||
-rw-r--r-- | app/views/shared/projects/_project.html.haml | 3 |
3 files changed, 0 insertions, 26 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index ecc8795c954..1ab163510bf 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -972,12 +972,6 @@ class Repository end end - def main_language - return unless head_exists? - - Linguist::Repository.new(rugged, rugged.head.target_id).language - end - def avatar return nil unless exists? diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb index 66136b62617..a886f35981f 100644 --- a/app/services/git_push_service.rb +++ b/app/services/git_push_service.rb @@ -53,10 +53,6 @@ class GitPushService < BaseService # could cause the last commit of a merge request to change. update_merge_requests - # Checks if the main language has changed in the project and if so - # it updates it accordingly - update_main_language - perform_housekeeping end @@ -64,19 +60,6 @@ class GitPushService < BaseService @project.repository.copy_gitattributes(params[:ref]) end - def update_main_language - # Performance can be bad so for now only check main_language once - # See https://gitlab.com/gitlab-org/gitlab-ce/issues/14937 - return if @project.main_language.present? - - return unless is_default_branch? - return unless push_to_new_branch? || push_to_existing_branch? - - current_language = @project.repository.main_language - @project.update_attributes(main_language: current_language) - true - end - protected def update_merge_requests diff --git a/app/views/shared/projects/_project.html.haml b/app/views/shared/projects/_project.html.haml index 9ef021747a5..b8b66d08db8 100644 --- a/app/views/shared/projects/_project.html.haml +++ b/app/views/shared/projects/_project.html.haml @@ -12,9 +12,6 @@ %li.project-row{ class: css_class } = cache(cache_key) do .controls - - if project.main_language - %span - = project.main_language - if project.commit.try(:status) %span = render_commit_status(project.commit) |