diff options
author | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
---|---|---|
committer | Andreas Kämmerle <andreas.kaemmerle@gmail.com> | 2018-09-13 12:00:59 +0200 |
commit | 87d01cc3bfc12c08024881dc8f13101e5430e3e6 (patch) | |
tree | 05e82defa51500257f97e3530862da03668895e3 /lib/gitlab/workhorse.rb | |
parent | fef5c923c009c64183cc43909444a1bdaba218b7 (diff) | |
parent | 71f3d48544cc0857c8d470b182f7e809de6a4642 (diff) | |
download | gitlab-ce-87d01cc3bfc12c08024881dc8f13101e5430e3e6.tar.gz |
Merge branch 'master' of https://gitlab.com/gitlab-org/gitlab-ce into consolidate-page-widths-part02consolidate-page-widths-part02
Diffstat (limited to 'lib/gitlab/workhorse.rb')
-rw-r--r-- | lib/gitlab/workhorse.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/gitlab/workhorse.rb b/lib/gitlab/workhorse.rb index a9629a92a50..30a8c3578d8 100644 --- a/lib/gitlab/workhorse.rb +++ b/lib/gitlab/workhorse.rb @@ -22,18 +22,27 @@ module Gitlab project = repository.project - { + attrs = { GL_ID: Gitlab::GlId.gl_id(user), GL_REPOSITORY: Gitlab::GlRepository.gl_repository(project, is_wiki), GL_USERNAME: user&.username, ShowAllRefs: show_all_refs, Repository: repository.gitaly_repository.to_h, RepoPath: 'ignored but not allowed to be empty in gitlab-workhorse', + GitConfigOptions: [], GitalyServer: { address: Gitlab::GitalyClient.address(project.repository_storage), token: Gitlab::GitalyClient.token(project.repository_storage) } } + + # Custom option for git-receive-pack command + receive_max_input_size = Gitlab::CurrentSettings.receive_max_input_size.to_i + if receive_max_input_size > 0 + attrs[:GitConfigOptions] << "receive.maxInputSize=#{receive_max_input_size.megabytes}" + end + + attrs end def send_git_blob(repository, blob) |