Skip to content
Snippets Groups Projects
Commit aa97ff7f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Fixed tree logs for branches with slash. Fixed remember of path when switch branch

parent f9528bfb
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -12,7 +12,7 @@ class RefsController < ProjectResourceController
respond_to do |format|
format.html do
new_path = if params[:destination] == "tree"
project_tree_path(@project, @ref)
project_tree_path(@project, (@ref + "/" + params[:path]))
else
project_commits_path(@project, @ref)
end
Loading
Loading
Loading
Loading
@@ -158,7 +158,7 @@ Gitlab::Application.routes.draw do
resources :deploy_keys
resources :protected_branches, only: [:index, :create, :destroy]
 
resources :refs, only: [], path: "/" do
resources :refs, only: [] do
collection do
get "switch"
end
Loading
Loading
Loading
Loading
@@ -52,7 +52,7 @@ module ExtractsPath
 
# Remove project, actions and all other staff from path
input.gsub!(/^\/#{Regexp.escape(@project.path_with_namespace)}/, "")
input.gsub!(/^\/(tree|commits|blame|blob)\//, "") # remove actions
input.gsub!(/^\/(tree|commits|blame|blob|refs)\//, "") # remove actions
input.gsub!(/\?.*$/, "") # remove stamps suffix
input.gsub!(/.atom$/, "") # remove rss feed
input.gsub!(/\/edit$/, "") # remove edit route part
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment