forked from forgejo/forgejo
update code.gitea.io/git (#450)
This commit is contained in:
parent
0c5c34d7dd
commit
47a7529d96
36 changed files with 509 additions and 480 deletions
5
vendor/code.gitea.io/git/submodule.go
generated
vendored
5
vendor/code.gitea.io/git/submodule.go
generated
vendored
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue