summaryrefslogtreecommitdiffstats
path: root/routers/private/branch.go
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2017-05-08 10:55:27 +0800
committerBo-Yi Wu <appleboy.tw@gmail.com>2017-05-08 10:55:27 +0800
commit2bb8b3a56219f3fcba7c77c7a8fc10769b8c11bd (patch)
tree0fb4e0e204dc72f99dd3a203ee9062bee3d93392 /routers/private/branch.go
parent79494047b062069fd8e692152d29773a22877d76 (diff)
downloadgitea-2bb8b3a56219f3fcba7c77c7a8fc10769b8c11bd.tar.gz
gitea-2bb8b3a56219f3fcba7c77c7a8fc10769b8c11bd.zip
fix bug when push a branch name with / & fix an integration test bug (#1689)
Diffstat (limited to 'routers/private/branch.go')
-rw-r--r--routers/private/branch.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/private/branch.go b/routers/private/branch.go
index e74087950e..8e42f73039 100644
--- a/routers/private/branch.go
+++ b/routers/private/branch.go
@@ -13,7 +13,7 @@ import (
// GetProtectedBranchBy get protected branch information
func GetProtectedBranchBy(ctx *macaron.Context) {
repoID := ctx.ParamsInt64(":id")
- branchName := ctx.Params(":branch")
+ branchName := ctx.Params("*")
protectBranch, err := models.GetProtectedBranchBy(repoID, branchName)
if err != nil {
ctx.JSON(500, map[string]interface{}{