summaryrefslogtreecommitdiffstats
path: root/services/context
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2024-11-19 17:21:13 +0100
committerEarl Warren <contact@earl-warren.org>2024-11-24 11:17:44 +0100
commitf3afd18b76c50e8493b2163db2711214e14d4cfd (patch)
tree3875312f8af18f54472063029993ba0c4304073f /services/context
parentFix a compilation error in the Gitpod environment (#32559) (diff)
downloadforgejo-f3afd18b76c50e8493b2163db2711214e14d4cfd.tar.xz
forgejo-f3afd18b76c50e8493b2163db2711214e14d4cfd.zip
Remove unnecessary code (#32560)
PushMirrors only be used in the repository setting page. So it should not be loaded on every repository page. (cherry picked from commit 0d5abd9b3e04a09f5d7de720c99e3451723e028e)
Diffstat (limited to 'services/context')
-rw-r--r--services/context/repo.go7
1 files changed, 0 insertions, 7 deletions
diff --git a/services/context/repo.go b/services/context/repo.go
index d2cee086d6..45a046eff6 100644
--- a/services/context/repo.go
+++ b/services/context/repo.go
@@ -413,14 +413,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
ctx.Data["DefaultWikiBranchName"] = setting.Repository.DefaultBranch