1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-10 11:38:20 +00:00

Fix commit name in Apply Patch page (#23086) (#23099)

Backport #23086

Fixes
https://github.com/go-gitea/gitea/issues/22621#issuecomment-1439309200

Co-authored-by: yp05327 <576951401@qq.com>
This commit is contained in:
Yarden Shoham
2023-02-24 02:47:35 +02:00
committed by GitHub
parent ced94f2e0d
commit b4ed3f07e4
2 changed files with 4 additions and 1 deletions

View File

@@ -25,6 +25,8 @@ const (
func NewDiffPatch(ctx *context.Context) {
canCommit := renderCommitRights(ctx)
ctx.Data["PageIsPatch"] = true
ctx.Data["TreePath"] = ""
ctx.Data["commit_summary"] = ""
@@ -51,6 +53,7 @@ func NewDiffPatchPost(ctx *context.Context) {
if form.CommitChoice == frmCommitChoiceNewBranch {
branchName = form.NewBranchName
}
ctx.Data["PageIsPatch"] = true
ctx.Data["TreePath"] = ""
ctx.Data["BranchLink"] = ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
ctx.Data["FileContent"] = form.Content