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
25c2dd97
Commit
25c2dd97
authored
Aug 11, 2017
by
Douwe Maan
Committed by
Eric Eastwood
Aug 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return nil parent_tree_url for root tree entity
parent
e43a6b0e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
app/serializers/tree_root_entity.rb
app/serializers/tree_root_entity.rb
+4
-3
No files found.
app/serializers/tree_root_entity.rb
View file @
25c2dd97
...
...
@@ -9,9 +9,10 @@ class TreeRootEntity < Grape::Entity
expose
:submodules
,
using:
SubmoduleEntity
expose
:parent_tree_url
do
|
tree
|
next
unless
tree
.
path
.
present?
path
=
tree
.
path
.
sub
(
%r{
\A
/}
,
''
)
next
unless
path
.
present?
path_segments
=
tree
.
path
.
split
(
'/'
)
path_segments
=
path
.
split
(
'/'
)
path_segments
.
pop
parent_tree_path
=
path_segments
.
join
(
'/'
)
...
...
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