Skip to content
3 changes: 2 additions & 1 deletion routers/repo/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ func NewFile(ctx *context.Context) {
func editFilePost(ctx *context.Context, form auth.EditRepoFileForm, isNewFile bool) {
canCommit := renderCommitRights(ctx)
treeNames, treePaths := getParentTreeFields(form.TreePath)
branchName := ctx.Repo.BranchName
branchName := path.Clean("/" + ctx.Repo.BranchName)[1:]
Comment thread
lafriks marked this conversation as resolved.
Outdated
form.NewBranchName = path.Clean("/" + form.NewBranchName)[1:]
if form.CommitChoice == frmCommitChoiceNewBranch {
branchName = form.NewBranchName
}
Expand Down