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
78823675
Commit
78823675
authored
7 years ago
by
Gabriel Mazetto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent using gitlab import task when hashed storage is enabled
parent
de89dcc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
lib/tasks/gitlab/import.rake
lib/tasks/gitlab/import.rake
+6
-0
No files found.
lib/tasks/gitlab/import.rake
View file @
78823675
...
@@ -11,6 +11,12 @@ namespace :gitlab do
...
@@ -11,6 +11,12 @@ namespace :gitlab do
#
#
desc
"GitLab | Import bare repositories from repositories -> storages into GitLab project instance"
desc
"GitLab | Import bare repositories from repositories -> storages into GitLab project instance"
task
repos: :environment
do
task
repos: :environment
do
if
Project
.
current_application_settings
.
hashed_storage_enabled
puts
'Cannot import repositories when Hashed Storage is enabled'
.
color
(
:red
)
exit
1
end
Gitlab
.
config
.
repositories
.
storages
.
each_value
do
|
repository_storage
|
Gitlab
.
config
.
repositories
.
storages
.
each_value
do
|
repository_storage
|
git_base_path
=
repository_storage
[
'path'
]
git_base_path
=
repository_storage
[
'path'
]
repos_to_import
=
Dir
.
glob
(
git_base_path
+
'/**/*.git'
)
repos_to_import
=
Dir
.
glob
(
git_base_path
+
'/**/*.git'
)
...
...
This diff is collapsed.
Click to expand it.
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