]> source.dussan.org Git - gitea.git/commitdiff
Remove unnecessary code (#32560)
authorLunny Xiao <xiaolunwen@gmail.com>
Tue, 19 Nov 2024 16:21:13 +0000 (08:21 -0800)
committerGitHub <noreply@github.com>
Tue, 19 Nov 2024 16:21:13 +0000 (16:21 +0000)
PushMirrors only be used in the repository setting page. So it should
not be loaded on every repository page.

services/context/repo.go

index e7b32d62832d49b7aeb53659c1ca7a93feaf7a17..1eafb7ca48bb46e6e60f4f6556da5b6832c5355b 100644 (file)
@@ -393,14 +393,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) {
                }
        }
 
-       pushMirrors, _, err := repo_model.GetPushMirrorsByRepoID(ctx, repo.ID, db.ListOptions{})
-       if err != nil {
-               ctx.ServerError("GetPushMirrorsByRepoID", err)
-               return
-       }
-
        ctx.Repo.Repository = repo
-       ctx.Data["PushMirrors"] = pushMirrors
        ctx.Data["RepoName"] = ctx.Repo.Repository.Name
        ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty