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
path: root/lib
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-11-17 15:35:05 +0300
committerWinnie Hellmann <winnie@gitlab.com>2017-11-17 17:22:36 +0300
commit4dd9988470fdf2d7e122579602491327697c0f93 (patch)
tree409789258877bde6c736ea8b0fa3a634a1cb02a7 /lib
parent9f62c6791381be14000168d098ab867015db6c4b (diff)
Merge branch 'dm-go-get-blank-enabled-protocol' into 'master'
Fix go-import meta data when enabled_git_access_protocol is a blank string Closes #40256 See merge request gitlab-org/gitlab-ce!15448 (cherry picked from commit 69dd59aec9e5f8959fa36eb74db28d71aad4212b) f767dd4a Fix go-import meta data when enabled_git_access_protocol is a blank string
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/middleware/go.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/middleware/go.rb b/lib/gitlab/middleware/go.rb
index cfc6b2a2029..1edda50e4b0 100644
--- a/lib/gitlab/middleware/go.rb
+++ b/lib/gitlab/middleware/go.rb
@@ -42,12 +42,11 @@ module Gitlab
project_url = URI.join(config.gitlab.url, path)
import_prefix = strip_url(project_url.to_s)
- repository_url = case current_application_settings.enabled_git_access_protocol
- when 'ssh'
+ repository_url = if current_application_settings.enabled_git_access_protocol == 'ssh'
shell = config.gitlab_shell
port = ":#{shell.ssh_port}" unless shell.ssh_port == 22
"ssh://#{shell.ssh_user}@#{shell.ssh_host}#{port}/#{path}.git"
- when 'http', nil
+ else
"#{project_url}.git"
end