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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
799b371e
Commit
799b371e
authored
Apr 20, 2020
by
Phil Hughes
Committed by
André Luís
Apr 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes file browser with slashes in branch name
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/215062
parent
b36406aa
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
app/assets/javascripts/repository/components/breadcrumbs.vue
app/assets/javascripts/repository/components/breadcrumbs.vue
+2
-2
app/assets/javascripts/repository/components/table/parent_row.vue
...ts/javascripts/repository/components/table/parent_row.vue
+2
-1
app/assets/javascripts/repository/components/table/row.vue
app/assets/javascripts/repository/components/table/row.vue
+1
-1
spec/features/projects/files/user_browses_files_spec.rb
spec/features/projects/files/user_browses_files_spec.rb
+28
-0
No files found.
app/assets/javascripts/repository/components/breadcrumbs.vue
View file @
799b371e
...
@@ -108,14 +108,14 @@ export default {
...
@@ -108,14 +108,14 @@ export default {
return
acc
.
concat
({
return
acc
.
concat
({
name
,
name
,
path
,
path
,
to
:
`/-/tree/
${
joinPaths
(
e
ncodeURIComponent
(
this
.
ref
),
path
)}
`
,
to
:
`/-/tree/
${
joinPaths
(
e
scapeFileUrl
(
this
.
ref
),
path
)}
`
,
});
});
},
},
[
[
{
{
name
:
this
.
projectShortPath
,
name
:
this
.
projectShortPath
,
path
:
'
/
'
,
path
:
'
/
'
,
to
:
`/-/tree/
${
e
ncodeURIComponent
(
this
.
ref
)}
/`
,
to
:
`/-/tree/
${
e
scapeFileUrl
(
this
.
ref
)}
/`
,
},
},
],
],
);
);
...
...
app/assets/javascripts/repository/components/table/parent_row.vue
View file @
799b371e
<
script
>
<
script
>
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
GlLoadingIcon
}
from
'
@gitlab/ui
'
;
import
{
escapeFileUrl
}
from
'
~/lib/utils/url_utility
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -28,7 +29,7 @@ export default {
...
@@ -28,7 +29,7 @@ export default {
return
splitArray
.
map
(
p
=>
encodeURIComponent
(
p
)).
join
(
'
/
'
);
return
splitArray
.
map
(
p
=>
encodeURIComponent
(
p
)).
join
(
'
/
'
);
},
},
parentRoute
()
{
parentRoute
()
{
return
{
path
:
`/-/tree/
${
e
ncodeURIComponent
(
this
.
commitRef
)}
/
${
this
.
parentPath
}
`
};
return
{
path
:
`/-/tree/
${
e
scapeFileUrl
(
this
.
commitRef
)}
/
${
this
.
parentPath
}
`
};
},
},
},
},
methods
:
{
methods
:
{
...
...
app/assets/javascripts/repository/components/table/row.vue
View file @
799b371e
...
@@ -99,7 +99,7 @@ export default {
...
@@ -99,7 +99,7 @@ export default {
computed
:
{
computed
:
{
routerLinkTo
()
{
routerLinkTo
()
{
return
this
.
isFolder
return
this
.
isFolder
?
{
path
:
`/-/tree/
${
e
ncodeURIComponent
(
this
.
ref
)}
/
${
escapeFileUrl
(
this
.
path
)}
`
}
?
{
path
:
`/-/tree/
${
e
scapeFileUrl
(
this
.
ref
)}
/
${
escapeFileUrl
(
this
.
path
)}
`
}
:
null
;
:
null
;
},
},
isFolder
()
{
isFolder
()
{
...
...
spec/features/projects/files/user_browses_files_spec.rb
View file @
799b371e
...
@@ -180,6 +180,20 @@ describe "User browses files" do
...
@@ -180,6 +180,20 @@ describe "User browses files" do
expect
(
page
).
to
have_content
(
"VERSION"
)
expect
(
page
).
to
have_content
(
"VERSION"
)
.
and
have_content
(
".gitignore"
)
.
and
have_content
(
".gitignore"
)
.
and
have_content
(
"LICENSE"
)
.
and
have_content
(
"LICENSE"
)
click_link
(
"files"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'files'
)
end
click_link
(
"html"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'html'
)
end
expect
(
page
).
to
have_link
(
'500.html'
)
end
end
end
end
...
@@ -193,6 +207,20 @@ describe "User browses files" do
...
@@ -193,6 +207,20 @@ describe "User browses files" do
expect
(
page
).
to
have_content
(
"VERSION"
)
expect
(
page
).
to
have_content
(
"VERSION"
)
.
and
have_content
(
".gitignore"
)
.
and
have_content
(
".gitignore"
)
.
and
have_content
(
"LICENSE"
)
.
and
have_content
(
"LICENSE"
)
click_link
(
"files"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'files'
)
end
click_link
(
"html"
)
page
.
within
(
'.repo-breadcrumb'
)
do
expect
(
page
).
to
have_link
(
'html'
)
end
expect
(
page
).
to
have_link
(
'500.html'
)
end
end
end
end
...
...
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