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
Léo-Paul Géneau
gitlab-ce
Commits
003f140c
Commit
003f140c
authored
Jan 22, 2018
by
Mike Greiling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ensure fork_source returns nil when project is the root fork, add tests
parent
1eefc384
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
app/models/project.rb
app/models/project.rb
+2
-0
spec/models/project_spec.rb
spec/models/project_spec.rb
+4
-0
No files found.
app/models/project.rb
View file @
003f140c
...
...
@@ -1032,6 +1032,8 @@ class Project < ActiveRecord::Base
end
def
fork_source
return
nil
unless
forked?
forked_from_project
||
fork_network
&
.
root_project
end
...
...
spec/models/project_spec.rb
View file @
003f140c
...
...
@@ -1951,6 +1951,10 @@ describe Project do
expect
(
second_fork
.
fork_source
).
to
eq
(
project
)
end
it
'returns nil if it is the root of the fork network'
do
expect
(
project
.
fork_source
).
to
be_nil
end
end
describe
'#lfs_storage_project'
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