Commit 79bcdfb8d7643e26fb93e234eaf3bc83332367dc
1 parent
c2265586
Exists in
master
and in
4 other branches
fix for branch names with '/'
Showing
1 changed file
with
8 additions
and
3 deletions
Show diff stats
config/routes.rb
@@ -41,14 +41,19 @@ Gitlab::Application.routes.draw do | @@ -41,14 +41,19 @@ Gitlab::Application.routes.draw do | ||
41 | end | 41 | end |
42 | 42 | ||
43 | member do | 43 | member do |
44 | - get "tree", :constraints => { :id => /[a-zA-Z.0-9_\-]+/ } | ||
45 | - get "blob" | 44 | + get "tree", :constraints => { :id => /[a-zA-Z.\/0-9_\-]+/ } |
45 | + get "blob", | ||
46 | + :constraints => { | ||
47 | + :id => /[a-zA-Z.0-9\/_\-]+/, | ||
48 | + :path => /.*/ | ||
49 | + } | ||
50 | + | ||
46 | 51 | ||
47 | # tree viewer | 52 | # tree viewer |
48 | get "tree/:path" => "refs#tree", | 53 | get "tree/:path" => "refs#tree", |
49 | :as => :tree_file, | 54 | :as => :tree_file, |
50 | :constraints => { | 55 | :constraints => { |
51 | - :id => /[a-zA-Z.0-9_\-]+/, | 56 | + :id => /[a-zA-Z.0-9\/_\-]+/, |
52 | :path => /.*/ | 57 | :path => /.*/ |
53 | } | 58 | } |
54 | end | 59 | end |