loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request 'feat(performance): remove `BranchName` in `/:owner/:repo/commit/:commit`' (#4891) from emilylange/feat-performance-remove-branchname into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/4891
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>

+2 -8
-6
routers/web/repo/commit.go
··· 416 416 } 417 417 } 418 418 419 - ctx.Data["BranchName"], err = commit.GetBranchName() 420 - if err != nil { 421 - ctx.ServerError("commit.GetBranchName", err) 422 - return 423 - } 424 - 425 419 ctx.HTML(http.StatusOK, tplCommitPage) 426 420 } 427 421
+2 -2
templates/repo/commit_page.tmpl
··· 71 71 "branchForm" "branch-dropdown-form" 72 72 "branchURLPrefix" (printf "%s/_cherrypick/%s/" $.RepoLink .CommitID) "branchURLSuffix" "" 73 73 "setAction" true "submitForm" true}} 74 - <form method="get" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{if $.BranchName}}{{PathEscapeSegments $.BranchName}}{{else}}{{PathEscapeSegments $.Repository.DefaultBranch}}{{end}}" id="branch-dropdown-form"> 75 - <input type="hidden" name="ref" value="{{if $.BranchName}}{{$.BranchName}}{{else}}{{$.Repository.DefaultBranch}}{{end}}"> 74 + <form method="get" action="{{$.RepoLink}}/_cherrypick/{{.CommitID}}/{{PathEscapeSegments $.Repository.DefaultBranch}}" id="branch-dropdown-form"> 75 + <input type="hidden" name="ref" value="{{$.Repository.DefaultBranch}}"> 76 76 <input type="hidden" name="refType" value="branch"> 77 77 <input type="hidden" id="cherry-pick-type" name="cherry-pick-type"><br> 78 78 <button type="submit" id="cherry-pick-submit" class="ui primary button"></button>