summaryrefslogtreecommitdiffstats
path: root/routers/routes
diff options
context:
space:
mode:
authorLauris BH <lauris@nix.lv>2017-10-15 22:59:24 +0300
committerGitHub <noreply@github.com>2017-10-15 22:59:24 +0300
commitf3833b7ce4dc78095194808c6e07d8ae133e7ab5 (patch)
treecdcb53731d4523f068a6e532bf5da9e2759f8cb2 /routers/routes
parentc25303b11c323045718a5af373c11f5807f77fb7 (diff)
downloadgitea-f3833b7ce4dc78095194808c6e07d8ae133e7ab5.tar.gz
gitea-f3833b7ce4dc78095194808c6e07d8ae133e7ab5.zip
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
Diffstat (limited to 'routers/routes')
-rw-r--r--routers/routes/routes.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/routers/routes/routes.go b/routers/routes/routes.go
index ac71b5eba3..9d9e656433 100644
--- a/routers/routes/routes.go
+++ b/routers/routes/routes.go
@@ -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