BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
003f140c
Unverified
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
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
project.rb
app/models/project.rb
+2
-0
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