mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-05 12:06:41 +08:00
Handle submodules without a .gitmodules entry - fix #1023
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user