diff options
author | Unknwon <u@gogs.io> | 2015-03-20 01:58:28 -0400 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2015-03-20 01:58:28 -0400 |
commit | 62e436e6b7a41bac2e17a26f08649c144cef5b57 (patch) | |
tree | 379be1b74989d5be2aacc68753b0d3d12597d400 /modules/git/submodule.go | |
parent | 4b9fb43a708d0aaaf710a060f7b2dd0b7ad959d0 (diff) | |
parent | e312634286e68d8fac4d20adb729661f8a444b2a (diff) |
Merge branch 'develop' of github.com:gogits/gogs into release/0.6.1
Diffstat (limited to 'modules/git/submodule.go')
-rw-r--r-- | modules/git/submodule.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/git/submodule.go b/modules/git/submodule.go index 6927f8cb..0c7c2696 100644 --- a/modules/git/submodule.go +++ b/modules/git/submodule.go @@ -31,6 +31,10 @@ func NewSubModuleFile(c *Commit, refUrl, refId string) *SubModuleFile { // RefUrl guesses and returns reference URL. func (sf *SubModuleFile) RefUrl() string { + if sf.refUrl == "" { + return "" + } + url := strings.TrimSuffix(sf.refUrl, ".git") // git://xxx/user/repo |