From d02d02c672bcac0d2ef46204d132645bc69827a8 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Mon, 12 Oct 2015 21:43:24 -0700 Subject: Fix error preventing displaying of commit data for a directory with a leading dot Closes https://github.com/gitlabhq/gitlabhq/issues/8763 --- config/routes.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index 8e6fbf6340c..893ab59c327 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -543,8 +543,10 @@ Gitlab::Application.routes.draw do member do # tree viewer logs get 'logs_tree', constraints: { id: Gitlab::Regex.git_reference_regex } + # Directories with leading dots erroneously get rejected if git + # ref regex used in constraints. Regex verification now done in controller. get 'logs_tree/*path' => 'refs#logs_tree', as: :logs_file, constraints: { - id: Gitlab::Regex.git_reference_regex, + id: /.*/, path: /.*/ } end -- cgit v1.2.1