diff options
author | wuweixin <wuweixin@gmail.com> | 2013-07-06 09:31:56 +0800 |
---|---|---|
committer | wuweixin <wuweixin@gmail.com> | 2013-07-06 09:31:56 +0800 |
commit | 2c7b0d5a4655348d4cf45378afa6cda4eb233af2 (patch) | |
tree | ee4a4a359ea463645651b6e0c19e7633eee340fa | |
parent | cab2ba0af300ec58ef325c4f9e5763aeebb61dbf (diff) | |
download | gitlab-ce-2c7b0d5a4655348d4cf45378afa6cda4eb233af2.tar.gz |
fix bug when project named: mediawiki
mediawiki.wiki.git
mediawiki.git
/.wiki$/ match awiki, so when your project named mediawiki
it will be find project named: "medi"
use /\.wiki$/ fix this bug
-rw-r--r-- | lib/gitlab/backend/grack_helpers.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/backend/grack_helpers.rb b/lib/gitlab/backend/grack_helpers.rb index 88b2d167312..5ac9e9f325b 100644 --- a/lib/gitlab/backend/grack_helpers.rb +++ b/lib/gitlab/backend/grack_helpers.rb @@ -3,7 +3,7 @@ module Grack def project_by_path(path) if m = /^\/([\w\.\/-]+)\.git/.match(path).to_a path_with_namespace = m.last - path_with_namespace.gsub!(/.wiki$/, '') + path_with_namespace.gsub!(/\.wiki$/, '') Project.find_with_namespace(path_with_namespace) end |