Commit df9cc314 authored by Stan Hu's avatar Stan Hu

Merge branch '334866-git-fails-to-clone-projects-with-trailing-dot-over-http' into 'master'

Fix git clone for projects with a trailing dot over HTTP

See merge request gitlab-org/gitlab!65489
parents b54c02bd 0391bf57
......@@ -177,7 +177,7 @@ module Gitlab
end
def repository_route_regex
@repository_route_regex ||= /#{full_namespace_route_regex}|#{personal_snippet_repository_path_regex}/.freeze
@repository_route_regex ||= /(#{full_namespace_route_regex}|#{personal_snippet_repository_path_regex})\.*/.freeze
end
def repository_git_route_regex
......@@ -185,7 +185,7 @@ module Gitlab
end
def repository_wiki_git_route_regex
@repository_wiki_git_route_regex ||= /#{full_namespace_route_regex}\.wiki\.git/.freeze
@repository_wiki_git_route_regex ||= /#{full_namespace_route_regex}\.*\.wiki\.git/.freeze
end
def full_namespace_path_regex
......
......@@ -445,6 +445,8 @@ RSpec.describe Gitlab::PathRegex do
[
'gitlab-org',
'gitlab-org/gitlab-test',
'gitlab-org/foo.',
'gitlab-org/bar..',
'gitlab-org/gitlab-test/snippets/1',
'gitlab-org/gitlab-test/snippets/foo', # ambiguous, we allow creating a sub-group called 'snippets'
'snippets/1'
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment