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
58c2f3b5
Commit
58c2f3b5
authored
Dec 21, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Repository#processable? to allow .git repos in the root folder
parent
2af3400c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
repository.rb
lib/gitlab/bare_repository_import/repository.rb
+2
-1
repository_spec.rb
spec/lib/gitlab/bare_repository_import/repository_spec.rb
+8
-2
No files found.
lib/gitlab/bare_repository_import/repository.rb
View file @
58c2f3b5
...
...
@@ -33,8 +33,9 @@ module Gitlab
def
processable?
return
false
if
wiki?
return
false
if
hashed?
&&
(
group_path
.
blank?
||
project_name
.
blank?
)
group_path
.
present?
&&
project_name
.
present?
true
end
private
...
...
spec/lib/gitlab/bare_repository_import/repository_spec.rb
View file @
58c2f3b5
...
...
@@ -27,7 +27,13 @@ describe ::Gitlab::BareRepositoryImport::Repository do
expect
(
subject
.
processable?
).
to
eq
(
false
)
end
it
'returns true when group and project name are present'
do
it
'returns true if group path is missing'
do
subject
=
described_class
.
new
(
'/full/path/'
,
'/full/path/repo.git'
)
expect
(
subject
.
processable?
).
to
eq
(
true
)
end
it
'returns true when group path and project name are present'
do
expect
(
subject
.
processable?
).
to
eq
(
true
)
end
end
...
...
@@ -97,7 +103,7 @@ describe ::Gitlab::BareRepositoryImport::Repository do
expect
(
subject
.
processable?
).
to
eq
(
false
)
end
it
'returns true when group and project name are present'
do
it
'returns true when group
path
and project name are present'
do
expect
(
subject
.
processable?
).
to
eq
(
true
)
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