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
Tatuya Kamada
gitlab-ce
Commits
200eeea2
Commit
200eeea2
authored
Mar 28, 2014
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the repository downloads path configurable
parent
0488e34b
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
2 deletions
+8
-2
CHANGELOG
CHANGELOG
+1
-0
app/controllers/projects/repositories_controller.rb
app/controllers/projects/repositories_controller.rb
+1
-1
config/gitlab.yml.example
config/gitlab.yml.example
+4
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+1
-0
lib/api/repositories.rb
lib/api/repositories.rb
+1
-1
No files found.
CHANGELOG
View file @
200eeea2
...
@@ -4,6 +4,7 @@ v 6.8.0
...
@@ -4,6 +4,7 @@ v 6.8.0
- Make user search case-insensitive (Christopher Arnold)
- Make user search case-insensitive (Christopher Arnold)
- Remove omniauth-ldap nickname bug workaround
- Remove omniauth-ldap nickname bug workaround
- Drop all tables before restoring a Postgres backup
- Drop all tables before restoring a Postgres backup
- Make the repository downloads path configurable
v 6.7.2
v 6.7.2
- Fix upgrader script
- Fix upgrader script
...
...
app/controllers/projects/repositories_controller.rb
View file @
200eeea2
...
@@ -14,7 +14,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
...
@@ -14,7 +14,7 @@ class Projects::RepositoriesController < Projects::ApplicationController
render_404
and
return
render_404
and
return
end
end
storage_path
=
Rails
.
root
.
join
(
"tmp"
,
"repositories"
)
storage_path
=
Gitlab
.
config
.
gitlab
.
repository_downloads_path
file_path
=
@repository
.
archive_repo
(
params
[
:ref
],
storage_path
,
params
[
:format
].
downcase
)
file_path
=
@repository
.
archive_repo
(
params
[
:ref
],
storage_path
,
params
[
:format
].
downcase
)
...
...
config/gitlab.yml.example
View file @
200eeea2
...
@@ -76,6 +76,10 @@ production: &base
...
@@ -76,6 +76,10 @@ production: &base
snippets: false
snippets: false
visibility_level: "private" # can be "private" | "internal" | "public"
visibility_level: "private" # can be "private" | "internal" | "public"
## Repository downloads directory
# When a user clicks e.g. 'Download zip' on a project, a temporary zip file is created in the following directory.
# repository_downloads_path: tmp/repositories
## External issues trackers
## External issues trackers
issues_tracker:
issues_tracker:
# redmine:
# redmine:
...
...
config/initializers/1_settings.rb
View file @
200eeea2
...
@@ -97,6 +97,7 @@ Settings.gitlab.default_projects_features['wiki'] = true if Settings.g
...
@@ -97,6 +97,7 @@ Settings.gitlab.default_projects_features['wiki'] = true if Settings.g
Settings
.
gitlab
.
default_projects_features
[
'wall'
]
=
false
if
Settings
.
gitlab
.
default_projects_features
[
'wall'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'wall'
]
=
false
if
Settings
.
gitlab
.
default_projects_features
[
'wall'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'snippets'
]
=
false
if
Settings
.
gitlab
.
default_projects_features
[
'snippets'
].
nil?
Settings
.
gitlab
.
default_projects_features
[
'snippets'
]
=
false
if
Settings
.
gitlab
.
default_projects_features
[
'snippets'
].
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
.
absolute_path
(
Settings
.
gitlab
[
'repository_downloads_path'
]
||
'tmp/repositories'
,
Rails
.
root
)
#
#
# Gravatar
# Gravatar
...
...
lib/api/repositories.rb
View file @
200eeea2
...
@@ -161,7 +161,7 @@ module API
...
@@ -161,7 +161,7 @@ module API
repo
=
user_project
.
repository
repo
=
user_project
.
repository
ref
=
params
[
:sha
]
ref
=
params
[
:sha
]
format
=
params
[
:format
]
format
=
params
[
:format
]
storage_path
=
Rails
.
root
.
join
(
"tmp"
,
"repositories"
)
storage_path
=
Gitlab
.
config
.
gitlab
.
repository_downloads_path
file_path
=
repo
.
archive_repo
(
ref
,
storage_path
,
format
)
file_path
=
repo
.
archive_repo
(
ref
,
storage_path
,
format
)
if
file_path
&&
File
.
exists?
(
file_path
)
if
file_path
&&
File
.
exists?
(
file_path
)
...
...
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