diff options
author | Dan Tudor <dtudor01@gmail.com> | 2015-03-25 15:15:26 +0000 |
---|---|---|
committer | Dan Tudor <dtudor01@gmail.com> | 2015-03-25 15:15:26 +0000 |
commit | 00dd44455a499050cd225990ed3fb9954f333b4d (patch) | |
tree | 4a8ed86802f9a6997ffd1589233a481309c154dd | |
parent | d554070a62b0bc34ab2289d4a071b950df4d5485 (diff) | |
download | gitlab-ce-00dd44455a499050cd225990ed3fb9954f333b4d.tar.gz |
Allow ability to delete branches with '/` in name
-rw-r--r-- | lib/api/branches.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/branches.rb b/lib/api/branches.rb index edfdf842f85..431d52a98ea 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 { |