diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-12-22 17:30:52 +0800 |
---|---|---|
committer | Thomas Boerger <thomas@webhippie.de> | 2016-12-22 10:30:52 +0100 |
commit | 47a7529d9655e11471bbe39958222a13854a6133 (patch) | |
tree | 98e597255245e17d39a0062c3977fb8a510cf413 /vendor/code.gitea.io/git/submodule.go | |
parent | 0c5c34d7ddaf31a6d8123dac36b221de61f5ff96 (diff) | |
download | gitea-47a7529d9655e11471bbe39958222a13854a6133.tar.gz gitea-47a7529d9655e11471bbe39958222a13854a6133.zip |
update code.gitea.io/git (#450)
Diffstat (limited to 'vendor/code.gitea.io/git/submodule.go')
-rw-r--r-- | vendor/code.gitea.io/git/submodule.go | 5 |
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 |