1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-02 07:38:35 +00:00

Inherit submodules from template repository content (#16237) (#33068)

Backport #16237 (it more likely a bug fix)

Co-authored-by: Steffen Schröter <steffen@vexar.de>
This commit is contained in:
wxiaoguang
2025-01-02 12:17:05 +08:00
committed by GitHub
parent 39cc72562b
commit 81768675d4
17 changed files with 290 additions and 135 deletions

View File

@@ -19,9 +19,9 @@
{{svg "octicon-file-submodule"}}
{{$refURL := $subModuleFile.RefURL AppUrl $.Repository.FullName $.SSHDomain}} {{/* FIXME: the usage of AppUrl seems incorrect, it would be fixed in the future, use AppSubUrl instead */}}
{{if $refURL}}
<a class="muted" href="{{$refURL}}">{{$entry.Name}}</a><span class="at">@</span><a href="{{$refURL}}/commit/{{PathEscape $subModuleFile.RefID}}">{{ShortSha $subModuleFile.RefID}}</a>
<a class="muted" href="{{$refURL}}">{{$entry.Name}}</a> <span class="at">@</span> <a href="{{$refURL}}/commit/{{PathEscape $subModuleFile.RefID}}">{{ShortSha $subModuleFile.RefID}}</a>
{{else}}
{{$entry.Name}}<span class="at">@</span>{{ShortSha $subModuleFile.RefID}}
{{$entry.Name}} <span class="at">@</span> {{ShortSha $subModuleFile.RefID}}
{{end}}
{{else}}
{{if $entry.IsDir}}