From 79bcdfb8d7643e26fb93e234eaf3bc83332367dc Mon Sep 17 00:00:00 2001 From: gitlabhq Date: Wed, 16 Nov 2011 12:30:17 -0500 Subject: [PATCH] fix for branch names with '/' --- config/routes.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/config/routes.rb b/config/routes.rb index f82d4c14ebf..840ef524cf0 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -41,14 +41,19 @@ Gitlab::Application.routes.draw do end member do - get "tree", :constraints => { :id => /[a-zA-Z.0-9_\-]+/ } - get "blob" + get "tree", :constraints => { :id => /[a-zA-Z.\/0-9_\-]+/ } + get "blob", + :constraints => { + :id => /[a-zA-Z.0-9\/_\-]+/, + :path => /.*/ + } + # tree viewer get "tree/:path" => "refs#tree", :as => :tree_file, :constraints => { - :id => /[a-zA-Z.0-9_\-]+/, + :id => /[a-zA-Z.0-9\/_\-]+/, :path => /.*/ } end