Commit c830bab79a86d2397d1bd66c911e549377e396b4
1 parent
37ff9d88
Exists in
master
and in
4 other branches
Commit List and Tree allow also + in branch name
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
config/routes.rb
... | ... | @@ -251,11 +251,11 @@ Gitlab::Application.routes.draw do |
251 | 251 | |
252 | 252 | member do |
253 | 253 | # tree viewer logs |
254 | - get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-#%]+/ } | |
254 | + get "logs_tree", constraints: { id: /[a-zA-Z.\/0-9_\-#%+]+/ } | |
255 | 255 | get "logs_tree/:path" => "refs#logs_tree", |
256 | 256 | as: :logs_file, |
257 | 257 | constraints: { |
258 | - id: /[a-zA-Z.0-9\/_\-#%]+/, | |
258 | + id: /[a-zA-Z.0-9\/_\-#%+]+/, | |
259 | 259 | path: /.*/ |
260 | 260 | } |
261 | 261 | end | ... | ... |
spec/routing/project_routing_spec.rb
... | ... | @@ -202,8 +202,10 @@ describe RefsController, "routing" do |
202 | 202 | it "to #logs_tree" do |
203 | 203 | get("/gitlabhq/refs/stable/logs_tree").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'stable') |
204 | 204 | get("/gitlabhq/refs/feature%2345/logs_tree").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'feature#45') |
205 | + get("/gitlabhq/refs/feature%2B45/logs_tree").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'feature+45') | |
205 | 206 | get("/gitlabhq/refs/stable/logs_tree/foo/bar/baz").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'stable', path: 'foo/bar/baz') |
206 | 207 | get("/gitlabhq/refs/feature%2345/logs_tree/foo/bar/baz").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'feature#45', path: 'foo/bar/baz') |
208 | + get("/gitlabhq/refs/feature%2B45/logs_tree/foo/bar/baz").should route_to('refs#logs_tree', project_id: 'gitlabhq', id: 'feature+45', path: 'foo/bar/baz') | |
207 | 209 | get("/gitlab/gitlabhq/refs/stable/logs_tree/files.scss").should route_to('refs#logs_tree', project_id: 'gitlab/gitlabhq', id: 'stable', path: 'files.scss') |
208 | 210 | end |
209 | 211 | end | ... | ... |