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
Boxiang Sun
gitlab-ce
Commits
6ae177ef
Commit
6ae177ef
authored
Jul 15, 2016
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid data-integrity issue when repository_downloads_path is incorrectly
parent
d62656b0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+15
-1
No files found.
config/initializers/1_settings.rb
View file @
6ae177ef
...
@@ -211,7 +211,6 @@ Settings.gitlab.default_projects_features['snippets'] = false if Setti
...
@@ -211,7 +211,6 @@ Settings.gitlab.default_projects_features['snippets'] = false if Setti
Settings
.
gitlab
.
default_projects_features
[
'builds'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'builds'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'builds'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'builds'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'container_registry'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'container_registry'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'container_registry'
]
=
true
if
Settings
.
gitlab
.
default_projects_features
[
'container_registry'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
]
=
Settings
.
send
(
:verify_constant
,
Gitlab
::
VisibilityLevel
,
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
Gitlab
::
VisibilityLevel
::
PRIVATE
)
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
]
=
Settings
.
send
(
:verify_constant
,
Gitlab
::
VisibilityLevel
,
Settings
.
gitlab
.
default_projects_features
[
'visibility_level'
],
Gitlab
::
VisibilityLevel
::
PRIVATE
)
Settings
.
gitlab
[
'repository_downloads_path'
]
=
File
.
join
(
Settings
.
shared
[
'path'
],
'cache/archive'
)
if
Settings
.
gitlab
[
'repository_downloads_path'
].
nil?
Settings
.
gitlab
[
'domain_whitelist'
]
||=
[]
Settings
.
gitlab
[
'domain_whitelist'
]
||=
[]
Settings
.
gitlab
[
'import_sources'
]
||=
%w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project]
Settings
.
gitlab
[
'import_sources'
]
||=
%w[github bitbucket gitlab gitorious google_code fogbugz git gitlab_project]
Settings
.
gitlab
[
'trusted_proxies'
]
||=
[]
Settings
.
gitlab
[
'trusted_proxies'
]
||=
[]
...
@@ -315,6 +314,21 @@ Settings.repositories['storages'] ||= {}
...
@@ -315,6 +314,21 @@ Settings.repositories['storages'] ||= {}
# Setting gitlab_shell.repos_path is DEPRECATED and WILL BE REMOVED in version 9.0
# Setting gitlab_shell.repos_path is DEPRECATED and WILL BE REMOVED in version 9.0
Settings
.
repositories
.
storages
[
'default'
]
||=
Settings
.
gitlab_shell
[
'repos_path'
]
||
Settings
.
gitlab
[
'user_home'
]
+
'/repositories/'
Settings
.
repositories
.
storages
[
'default'
]
||=
Settings
.
gitlab_shell
[
'repos_path'
]
||
Settings
.
gitlab
[
'user_home'
]
+
'/repositories/'
#
# The repository_downloads_path is used to remove outdated repository
# archives, if someone has it configured incorrectly, and it points
# to the path where repositories are stored this can cause some
# data-integrity issue. In this case, we sets it to the default
# repository_downloads_path value.
#
repositories_storages_path
=
Settings
.
repositories
.
storages
.
values
repository_downloads_path
=
Settings
.
gitlab
[
'repository_downloads_path'
].
to_s
.
gsub
(
/\/$/
,
''
)
repository_downloads_full_path
=
File
.
expand_path
(
repository_downloads_path
,
Settings
.
gitlab
[
'user_home'
])
if
repository_downloads_path
.
blank?
||
repositories_storages_path
.
any?
{
|
path
|
[
repository_downloads_path
,
repository_downloads_full_path
].
include?
(
path
.
gsub
(
/\/$/
,
''
))
}
Settings
.
gitlab
[
'repository_downloads_path'
]
=
File
.
join
(
Settings
.
shared
[
'path'
],
'cache/archive'
)
end
#
#
# Backup
# Backup
#
#
...
...
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