diff options
author | mrsdizzie <info@mrsdizzie.com> | 2020-09-07 20:08:10 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-07 20:08:10 -0400 |
commit | 489c8a1478885737b8e42099fab673c6b1f3640d (patch) | |
tree | 7e246c70f0224ed9c536f38895c789adac88d1b2 /templates | |
parent | 9af60ce0bb5d6fe19cf2c3ecd37e658e8952400a (diff) | |
download | gitea-489c8a1478885737b8e42099fab673c6b1f3640d.tar.gz gitea-489c8a1478885737b8e42099fab673c6b1f3640d.zip |
Compare SSH_DOMAIN when parsing submodule URLs (#12753)
Right now we only compare the hostname from a submodule with the prefixURL it is viewed from to check if the submodule is hosted on the same Gitea instance. This adds an additional check to compare it against SSH_DOMAIN as well since the same Gitea instance might have a different hostname for SSH and if the submodule uses that hostname we should also detect that and link to the proper DOMAIN value.
Fixes #12747, #9756
Diffstat (limited to 'templates')
-rw-r--r-- | templates/repo/view_list.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl index 2e70f4ff84..3b469f4fca 100644 --- a/templates/repo/view_list.tmpl +++ b/templates/repo/view_list.tmpl @@ -47,7 +47,7 @@ <span class="truncate"> {{if $entry.IsSubModule}} {{svg "octicon-file-submodule" 16}} - {{$refURL := $commit.RefURL AppUrl $.Repository.FullName}} + {{$refURL := $commit.RefURL AppUrl $.Repository.FullName $.SSHDomain}} {{if $refURL}} <a href="{{$refURL}}">{{$entry.Name}}</a><span class="at">@</span><a href="{{$refURL}}/commit/{{$commit.RefID}}">{{ShortSha $commit.RefID}}</a> {{else}} |