mirror of
https://github.com/go-gitea/gitea
synced 2025-07-25 19:58:36 +00:00
Backport #35109 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
@@ -310,9 +310,10 @@ func handleRepoEmptyOrBroken(ctx *context.Context) {
|
||||
}
|
||||
|
||||
func handleRepoViewSubmodule(ctx *context.Context, submodule *git.SubModule) {
|
||||
// TODO: it needs to use git.NewCommitSubmoduleFile and SubmoduleWebLinkTree to correctly handle relative paths
|
||||
submoduleRepoURL, err := giturl.ParseRepositoryURL(ctx, submodule.URL)
|
||||
if err != nil {
|
||||
HandleGitError(ctx, "prepareToRenderDirOrFile: ParseRepositoryURL", err)
|
||||
HandleGitError(ctx, "handleRepoViewSubmodule: ParseRepositoryURL", err)
|
||||
return
|
||||
}
|
||||
submoduleURL := giturl.MakeRepositoryWebLink(submoduleRepoURL)
|
||||
|
Reference in New Issue
Block a user