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 | 41 | end |
| 42 | 42 | |
| 43 | 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 | 52 | # tree viewer |
| 48 | 53 | get "tree/:path" => "refs#tree", |
| 49 | 54 | :as => :tree_file, |
| 50 | 55 | :constraints => { |
| 51 | - :id => /[a-zA-Z.0-9_\-]+/, | |
| 56 | + :id => /[a-zA-Z.0-9\/_\-]+/, | |
| 52 | 57 | :path => /.*/ |
| 53 | 58 | } |
| 54 | 59 | end | ... | ... |