aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
Diffstat (limited to 'internal')
-rw-r--r--internal/db/mocks_test.go2
-rw-r--r--internal/gitutil/submodule.go2
-rw-r--r--internal/gitutil/submodule_test.go2
-rw-r--r--internal/route/lfs/mocks_test.go2
4 files changed, 4 insertions, 4 deletions
diff --git a/internal/db/mocks_test.go b/internal/db/mocks_test.go
index 491e1da2..6ba67770 100644
--- a/internal/db/mocks_test.go
+++ b/internal/db/mocks_test.go
@@ -1,4 +1,4 @@
-// Code generated by go-mockgen 1.3.3; DO NOT EDIT.
+// Code generated by go-mockgen 1.3.7; DO NOT EDIT.
//
// This file was generated by running `go-mockgen` at the root of this repository.
// To add additional mocks to this or another package, add a new entry to the
diff --git a/internal/gitutil/submodule.go b/internal/gitutil/submodule.go
index 73e08040..519a24f9 100644
--- a/internal/gitutil/submodule.go
+++ b/internal/gitutil/submodule.go
@@ -50,7 +50,7 @@ func InferSubmoduleURL(baseURL string, mod *git.Submodule) string {
case "http", "https":
raw = parsed.String()
case "ssh":
- raw = fmt.Sprintf("http://%s%s", parsed.Host, parsed.Path)
+ raw = fmt.Sprintf("http://%s%s", parsed.Hostname(), parsed.Path)
default:
return raw
}
diff --git a/internal/gitutil/submodule_test.go b/internal/gitutil/submodule_test.go
index 53f48766..0ef60a0d 100644
--- a/internal/gitutil/submodule_test.go
+++ b/internal/gitutil/submodule_test.go
@@ -31,7 +31,7 @@ func TestInferSubmoduleURL(t *testing.T) {
URL: "ssh://user@github.com:22/gogs/docs-api.git",
Commit: "6b08f76a5313fa3d26859515b30aa17a5faa2807",
},
- expURL: "http://github.com:22/gogs/docs-api/commit/6b08f76a5313fa3d26859515b30aa17a5faa2807",
+ expURL: "http://github.com/gogs/docs-api/commit/6b08f76a5313fa3d26859515b30aa17a5faa2807",
},
{
name: "SSH URL in SCP syntax",
diff --git a/internal/route/lfs/mocks_test.go b/internal/route/lfs/mocks_test.go
index 7ab968d3..e4f013a6 100644
--- a/internal/route/lfs/mocks_test.go
+++ b/internal/route/lfs/mocks_test.go
@@ -1,4 +1,4 @@
-// Code generated by go-mockgen 1.3.3; DO NOT EDIT.
+// Code generated by go-mockgen 1.3.7; DO NOT EDIT.
//
// This file was generated by running `go-mockgen` at the root of this repository.
// To add additional mocks to this or another package, add a new entry to the