summaryrefslogtreecommitdiff
path: root/lib/extracts_path.rb
diff options
context:
space:
mode:
authorSato Hiroyuki <sathiroyuki@gmail.com>2013-01-29 17:25:17 +0900
committerSato Hiroyuki <sathiroyuki@gmail.com>2013-01-30 09:12:03 +0900
commit525a8cd3e96b7bae0acda8b6e94df529fa06ff6a (patch)
treedbfda7c6ee03274470c2176c7c19dc396fc4ac5a /lib/extracts_path.rb
parentc84675ee06dfc72c46c178ef40e30f03053dcc5a (diff)
downloadgitlab-ce-525a8cd3e96b7bae0acda8b6e94df529fa06ff6a.tar.gz
Switchable the main branch on network graph
Diffstat (limited to 'lib/extracts_path.rb')
-rw-r--r--lib/extracts_path.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/extracts_path.rb b/lib/extracts_path.rb
index 12700e4f4ac..976ac018204 100644
--- a/lib/extracts_path.rb
+++ b/lib/extracts_path.rb
@@ -54,9 +54,10 @@ module ExtractsPath
input.gsub!(/^#{Gitlab.config.gitlab.relative_url_root}/, "")
# Remove project, actions and all other staff from path
input.gsub!(/^\/#{Regexp.escape(@project.path_with_namespace)}/, "")
- input.gsub!(/^\/(tree|commits|blame|blob|refs)\//, "") # remove actions
+ input.gsub!(/^\/(tree|commits|blame|blob|refs|graph)\//, "") # remove actions
input.gsub!(/\?.*$/, "") # remove stamps suffix
input.gsub!(/.atom$/, "") # remove rss feed
+ input.gsub!(/.json$/, "") # remove json suffix
input.gsub!(/\/edit$/, "") # remove edit route part
if input.match(/^([[:alnum:]]{40})(.+)/)