Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
aa97ff7f
Commit
aa97ff7f
authored
Jan 09, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed tree logs for branches with slash. Fixed remember of path when switch branch
parent
f9528bfb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
app/controllers/refs_controller.rb
app/controllers/refs_controller.rb
+1
-1
config/routes.rb
config/routes.rb
+1
-1
lib/extracts_path.rb
lib/extracts_path.rb
+1
-1
No files found.
app/controllers/refs_controller.rb
View file @
aa97ff7f
...
...
@@ -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
...
...
config/routes.rb
View file @
aa97ff7f
...
...
@@ -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
...
...
lib/extracts_path.rb
View file @
aa97ff7f
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment