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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-04-05 12:08:41 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2016-04-05 12:08:41 +0300
commitaad3b6ddf88e31072602af7d1d06f64e1823673b (patch)
tree26a71b322a5d904e58964ce4788fef8ee3187f70 /app/services/git_push_service.rb
parentb8d1545bf18e672a68b9095e4c9c6cd6c018aad7 (diff)
Update language only on HEAD of the repository
Diffstat (limited to 'app/services/git_push_service.rb')
-rw-r--r--app/services/git_push_service.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/services/git_push_service.rb b/app/services/git_push_service.rb
index c76c118df1a..36c9ee92da1 100644
--- a/app/services/git_push_service.rb
+++ b/app/services/git_push_service.rb
@@ -55,6 +55,9 @@ class GitPushService < BaseService
end
def update_main_language
+ return unless is_default_branch?
+ return unless push_to_new_branch? || push_to_existing_branch?
+
current_language = @project.repository.main_language
unless current_language == @project.main_language