Fixed tree logs for branches with slash. Fixed remember of path when switch branch
This commit is contained in:
parent
f9528bfb86
commit
aa97ff7fde
|
@ -12,7 +12,7 @@ class RefsController < ProjectResourceController
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html do
|
format.html do
|
||||||
new_path = if params[:destination] == "tree"
|
new_path = if params[:destination] == "tree"
|
||||||
project_tree_path(@project, @ref)
|
project_tree_path(@project, (@ref + "/" + params[:path]))
|
||||||
else
|
else
|
||||||
project_commits_path(@project, @ref)
|
project_commits_path(@project, @ref)
|
||||||
end
|
end
|
||||||
|
|
|
@ -158,7 +158,7 @@ Gitlab::Application.routes.draw do
|
||||||
resources :deploy_keys
|
resources :deploy_keys
|
||||||
resources :protected_branches, only: [:index, :create, :destroy]
|
resources :protected_branches, only: [:index, :create, :destroy]
|
||||||
|
|
||||||
resources :refs, only: [], path: "/" do
|
resources :refs, only: [] do
|
||||||
collection do
|
collection do
|
||||||
get "switch"
|
get "switch"
|
||||||
end
|
end
|
||||||
|
|
|
@ -52,7 +52,7 @@ module ExtractsPath
|
||||||
|
|
||||||
# Remove project, actions and all other staff from path
|
# Remove project, actions and all other staff from path
|
||||||
input.gsub!(/^\/#{Regexp.escape(@project.path_with_namespace)}/, "")
|
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!(/\?.*$/, "") # remove stamps suffix
|
||||||
input.gsub!(/.atom$/, "") # remove rss feed
|
input.gsub!(/.atom$/, "") # remove rss feed
|
||||||
input.gsub!(/\/edit$/, "") # remove edit route part
|
input.gsub!(/\/edit$/, "") # remove edit route part
|
||||||
|
|
Loading…
Reference in a new issue