]> source.dussan.org Git - gitea.git/commitdiff
Fix broken clone script on an empty archived repo (#24339) (#24348)
authorGiteabot <teabot@gitea.io>
Wed, 26 Apr 2023 08:13:16 +0000 (04:13 -0400)
committerGitHub <noreply@github.com>
Wed, 26 Apr 2023 08:13:16 +0000 (10:13 +0200)
Backport #24339 by @yardenshoham

I made it render the script even if the repo is archived

- Fixes #24324

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: Yarden Shoham <git@yardenshoham.com>
templates/repo/empty.tmpl

index cb883e8df5aef6d8dab4db01bd0dc934c596d9e3..d2967e618128f134a06e6b53e9e7afe7501c3b13 100644 (file)
@@ -50,13 +50,13 @@ git push -u origin {{.Repository.DefaultBranch}}</code></pre>
 git push -u origin {{.Repository.DefaultBranch}}</code></pre>
                                                                </div>
                                                        </div>
-                                                       {{template "repo/clone_script" .}}
                                                {{end}}
                                        {{else}}
                                                <div class="ui segment center">
                                                        {{.locale.Tr "repo.empty_message"}}
                                                </div>
                                        {{end}}
+                                       {{template "repo/clone_script" .}}
                                </div>
                        </div>
                </div>