aboutsummaryrefslogtreecommitdiffstats
path: root/routers
diff options
context:
space:
mode:
authoryp05327 <576951401@qq.com>2023-02-24 06:14:07 +0900
committerGitHub <noreply@github.com>2023-02-23 15:14:07 -0600
commited954b070d481a14aac08f925a15ecc8c2c33c61 (patch)
tree4ebafb341c9db0cc8629ce8269674443007960a2 /routers
parent8ed6096158cb764f2259232eba0a46e6c273354c (diff)
downloadgitea-ed954b070d481a14aac08f925a15ecc8c2c33c61.tar.gz
gitea-ed954b070d481a14aac08f925a15ecc8c2c33c61.zip
Fix commit name in Apply Patch page (#23086)
Fixes https://github.com/go-gitea/gitea/issues/22621#issuecomment-1439309200
Diffstat (limited to 'routers')
-rw-r--r--routers/web/repo/patch.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/routers/web/repo/patch.go b/routers/web/repo/patch.go
index 12b26f38e9..0ffec0c4ea 100644
--- a/routers/web/repo/patch.go
+++ b/routers/web/repo/patch.go
@@ -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