summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-31 19:30:15 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-03-31 19:30:15 +0300
commiteb2339a4018836086d0dae8245fa084220bfed0b (patch)
tree8bd1ed71c6c16eac9e0fc512b46edbd3141f1317
parent0191857fac465fbfb4acad1b923c29f3b05529aa (diff)
parenta6c633567173e4675f37ec19d31094bf6c50ed3c (diff)
downloadgitlab-ce-eb2339a4018836086d0dae8245fa084220bfed0b.tar.gz
Merge pull request #9023 from dantudor/patch-1
Allow ability to delete branches with '/` in name
-rw-r--r--lib/api/branches.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb
index edfdf842f85..592100a7045 100644
--- a/lib/api/branches.rb
+++ b/lib/api/branches.rb
@@ -1,5 +1,4 @@
require 'mime/types'
-require 'uri'
module API
# Projects API
@@ -101,10 +100,11 @@ module API
# branch (required) - The name of the branch
# Example Request:
# DELETE /projects/:id/repository/branches/:branch
- delete ":id/repository/branches/:branch" do
+ delete ":id/repository/branches/:branch",
+ requirements: { branch: /.*/ } do
authorize_push_project
result = DeleteBranchService.new(user_project, current_user).
- execute(URI.unescape(params[:branch]))
+ execute(params[:branch])
if result[:status] == :success
{