Skip to content

Commit 0d5abd9

Browse files
authored
Remove unnecessary code (#32560)
PushMirrors only be used in the repository setting page. So it should not be loaded on every repository page.
1 parent 32456b6 commit 0d5abd9

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

services/context/repo.go

-7
Original file line numberDiff line numberDiff line change
@@ -393,14 +393,7 @@ func repoAssignment(ctx *Context, repo *repo_model.Repository) {
393393
}
394394
}
395395

396-
pushMirrors, _, err := repo_model.GetPushMirrorsByRepoID(ctx, repo.ID, db.ListOptions{})
397-
if err != nil {
398-
ctx.ServerError("GetPushMirrorsByRepoID", err)
399-
return
400-
}
401-
402396
ctx.Repo.Repository = repo
403-
ctx.Data["PushMirrors"] = pushMirrors
404397
ctx.Data["RepoName"] = ctx.Repo.Repository.Name
405398
ctx.Data["IsEmptyRepo"] = ctx.Repo.Repository.IsEmpty
406399

0 commit comments

Comments
 (0)