summaryrefslogtreecommitdiffstats
path: root/app/controllers/repositories_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/repositories_controller.rb')
-rw-r--r--app/controllers/repositories_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 539dcd9dc..cd467d2d7 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -36,7 +36,7 @@ class RepositoriesController < ApplicationController
rescue_from Redmine::Scm::Adapters::CommandFailed, :with => :show_error_command_failed
def new
- scm = params[:repository_scm] || Redmine::Scm::Base.all.first
+ scm = params[:repository_scm] || (Redmine::Scm::Base.all & Setting.enabled_scm).first
@repository = Repository.factory(scm)
@repository.is_default = @project.repository.nil?
@repository.project = @project