summaryrefslogtreecommitdiffstats
path: root/modules/git/submodule_test.go
diff options
context:
space:
mode:
authorzeripath <art27@cantab.net>2020-08-13 05:19:04 +0100
committerGitHub <noreply@github.com>2020-08-13 00:19:04 -0400
commitbe1b33c1971a5fdf5356dafa43b83df837fa656e (patch)
tree5189c06fde10548f46953793b2a3fafe7ceba789 /modules/git/submodule_test.go
parent4e1c7cc4efb537ed6cb35537f059f58cf402a9d0 (diff)
downloadgitea-be1b33c1971a5fdf5356dafa43b83df837fa656e.tar.gz
gitea-be1b33c1971a5fdf5356dafa43b83df837fa656e.zip
Do not add prefix on http/https submodule links (#12477)
Fix #12345 Signed-off-by: Andrew Thornton <art27@cantab.net>
Diffstat (limited to 'modules/git/submodule_test.go')
-rw-r--r--modules/git/submodule_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/git/submodule_test.go b/modules/git/submodule_test.go
index 458c547dcb..fcb0c6fd67 100644
--- a/modules/git/submodule_test.go
+++ b/modules/git/submodule_test.go
@@ -28,6 +28,7 @@ func TestGetRefURL(t *testing.T) {
{"git://git@try.gitea.io:9999/go-gitea/gitea", "https://try.gitea.io/", "go-gitea/sdk", "https://try.gitea.io/go-gitea/gitea"},
{"ssh://git@127.0.0.1:9999/go-gitea/gitea", "https://127.0.0.1:3000/", "go-gitea/sdk", "https://127.0.0.1:3000/go-gitea/gitea"},
{"https://gitea.com:3000/user1/repo1.git", "https://127.0.0.1:3000/", "user/repo2", "https://gitea.com:3000/user1/repo1"},
+ {"https://example.gitea.com/gitea/user1/repo1.git", "https://example.gitea.com/gitea/", "user/repo2", "https://example.gitea.com/gitea/user1/repo1"},
{"https://username:password@github.com/username/repository.git", "/", "username/repository2", "https://username:password@github.com/username/repository"},
{"somethingbad", "https://127.0.0.1:3000/go-gitea/gitea", "/", ""},
{"git@localhost:user/repo", "https://localhost/", "user2/repo1", "https://localhost/user/repo"},