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
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
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
lib/gitlab/bare_repository_import/repository.rb
lib/gitlab/bare_repository_import/repository.rb
+2
-1
spec/lib/gitlab/bare_repository_import/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