summaryrefslogtreecommitdiffstats
path: root/vendor/code.gitea.io/git/submodule.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/code.gitea.io/git/submodule.go')
-rw-r--r--vendor/code.gitea.io/git/submodule.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/vendor/code.gitea.io/git/submodule.go b/vendor/code.gitea.io/git/submodule.go
index 5777330058..a0fe7b4a56 100644
--- a/vendor/code.gitea.io/git/submodule.go
+++ b/vendor/code.gitea.io/git/submodule.go
@@ -6,6 +6,7 @@ package git
import "strings"
+// SubModule submodule is a reference on git repository
type SubModule struct {
Name string
URL string
@@ -19,6 +20,7 @@ type SubModuleFile struct {
refID string
}
+// NewSubModuleFile create a new submodule file
func NewSubModuleFile(c *Commit, refURL, refID string) *SubModuleFile {
return &SubModuleFile{
Commit: c,
@@ -64,9 +66,8 @@ func (sf *SubModuleFile) RefURL(urlPrefix string, parentPath string) string {
// fix problem with reverse proxy works only with local server
if strings.Contains(urlPrefix, url[i+1:j]) {
return urlPrefix + url[j+1:]
- } else {
- return "http://" + url[i+1:j] + "/" + url[j+1:]
}
+ return "http://" + url[i+1:j] + "/" + url[j+1:]
}
return url