Skip to content

Commit

Permalink
Remove unnecessary code (#32560)
Browse files Browse the repository at this point in the history
PushMirrors only be used in the repository setting page. So it should
not be loaded on every repository page.
  • Loading branch information
lunny authored Nov 19, 2024
1 parent 32456b6 commit 0d5abd9
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 @@ -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

Expand Down

0 comments on commit 0d5abd9

Please sign in to comment.