authorize_ssh_protocol_in_git_url.patch
lib/scm_repositories_helper_patch.rb (copie de travail) | ||
---|---|---|
71 | 71 |
matches = Regexp.new("^#{Regexp.escape(path)}/([^/]+)/?$").match(@project.repository.url) |
72 | 72 |
if matches |
73 | 73 |
url = '' |
74 |
if gitconf['url'] =~ %r{^(?:https?|git)://} |
|
74 |
if gitconf['url'] =~ %r{^(?:https?|git|ssh)://}
|
|
75 | 75 |
url = "#{gitconf['url']}/#{matches[1]}" |
76 | 76 |
else |
77 | 77 |
url = "#{Setting.protocol}://#{Setting.host_name}/#{gitconf['url']}/#{matches[1]}" |