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
iv
gitlab-ce
Commits
ecbe119a
Commit
ecbe119a
authored
Aug 02, 2015
by
Stan Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix "Network" and "Graphs" pages for branches with encoded slashes
Closes #1359
parent
208e07fe
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
1 deletion
+12
-1
CHANGELOG
CHANGELOG
+1
-0
lib/extracts_path.rb
lib/extracts_path.rb
+1
-1
spec/lib/extracts_path_spec.rb
spec/lib/extracts_path_spec.rb
+10
-0
No files found.
CHANGELOG
View file @
ecbe119a
Please view this file on the master branch, on stable branches it's out of date.
v 7.14.0 (unreleased)
- Fix "Network" and "Graphs" pages for branches with encoded slashes (Stan Hu)
- Fix errors deleting and creating branches with encoded slashes (Stan Hu)
- Fix multi-line syntax highlighting (Stan Hu)
- Fix network graph when branch name has single quotes (Stan Hu)
...
...
lib/extracts_path.rb
View file @
ecbe119a
...
...
@@ -94,7 +94,7 @@ module ExtractsPath
@options
=
params
.
select
{
|
key
,
value
|
allowed_options
.
include?
(
key
)
&&
!
value
.
blank?
}
@options
=
HashWithIndifferentAccess
.
new
(
@options
)
@id
=
get_id
@id
=
Addressable
::
URI
.
unescape
(
get_id
)
@ref
,
@path
=
extract_ref
(
@id
)
@repo
=
@project
.
repository
if
@options
[
:extended_sha1
].
blank?
...
...
spec/lib/extracts_path_spec.rb
View file @
ecbe119a
...
...
@@ -29,6 +29,16 @@ describe ExtractsPath do
assign_ref_vars
expect
(
@logs_path
).
to
eq
(
"/
#{
@project
.
path_with_namespace
}
/refs/
#{
ref
}
/logs_tree/files/ruby/popen.rb"
)
end
context
'escaped sequences in ref'
do
let
(
:ref
)
{
"improve%2Fawesome"
}
it
"id should have no escape sequences"
do
assign_ref_vars
expect
(
@ref
).
to
eq
(
'improve/awesome'
)
expect
(
@logs_path
).
to
eq
(
"/
#{
@project
.
path_with_namespace
}
/refs/
#{
ref
}
/logs_tree/files/ruby/popen.rb"
)
end
end
end
describe
'#extract_ref'
do
...
...
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