1
0
Fork 0
forked from forgejo/forgejo

Create new branch from branch selection dropdown (#2130)

* Create new branch from branch selection dropdown and rewrite it to VueJS

* Make updateLocalCopyToCommit as not exported

* Move branch name validation to model

* Fix possible race condition
This commit is contained in:
Lauris BH 2017-10-15 22:59:24 +03:00 committed by GitHub
parent c25303b11c
commit f3833b7ce4
14 changed files with 641 additions and 69 deletions

View file

@ -554,6 +554,10 @@ func RegisterRoutes(m *macaron.Macaron) {
return
}
})
m.Group("/branches", func() {
m.Post("/_new/*", context.RepoRef(), bindIgnErr(auth.NewBranchForm{}), repo.CreateBranch)
}, reqRepoWriter, repo.MustBeNotBare)
}, reqSignIn, context.RepoAssignment(), context.UnitTypes(), context.LoadRepoUnits())
// Releases