Skip to content

Commit

Permalink
remove treepath="patch" elsewhere too
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Thornton <art27@cantab.net>
  • Loading branch information
zeripath committed Feb 12, 2022
1 parent f370b9b commit 9f98839
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion routers/web/repo/cherry_pick.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func CherryPick(ctx *context.Context) {
ctx.Data["RequireHighlightJS"] = true

canCommit := renderCommitRights(ctx)
ctx.Data["TreePath"] = "patch"
ctx.Data["TreePath"] = ""

if canCommit {
ctx.Data["commit_choice"] = frmCommitChoiceDirect
Expand Down
2 changes: 1 addition & 1 deletion routers/web/repo/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func NewDiffPatchPost(ctx *context.Context) {
branchName = form.NewBranchName
}
ctx.Data["RequireHighlightJS"] = true
ctx.Data["TreePath"] = "patch"
ctx.Data["TreePath"] = ""
ctx.Data["BranchLink"] = ctx.Repo.RepoLink + "/src/" + ctx.Repo.BranchNameSubURL()
ctx.Data["FileContent"] = form.Content
ctx.Data["commit_summary"] = form.CommitSummary
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/editor/patch.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<div class="divider">:</div>
<a class="section" href="{{$.BranchLink}}">{{.BranchName}}</a>
<span>{{.i18n.Tr "repo.editor.or"}} <a href="{{$.BranchLink}}">{{.i18n.Tr "repo.editor.cancel_lower"}}</a></span>
<input type="hidden" id="tree_path" name="tree_path" value="patch" required>
<input type="hidden" id="tree_path" name="tree_path" value="" required>
<input id="file-name" type="hidden" value="diff.patch">
</div>
</div>
Expand Down

0 comments on commit 9f98839

Please sign in to comment.