Skip to content

Commit

Permalink
Remove unnecessary code (go-gitea#32560) (go-gitea#32567)
Browse files Browse the repository at this point in the history
Backport go-gitea#32560 by @lunny

PushMirrors only be used in the repository setting page. So it should
not be loaded on every repository page.

Co-authored-by: Lunny Xiao <[email protected]>
  • Loading branch information
GiteaBot and lunny authored Nov 19, 2024
1 parent cf2d332 commit 3661b14
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions services/context/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,14 +394,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
}
Expand Down

0 comments on commit 3661b14

Please sign in to comment.