summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2018-08-07 17:12:13 -0500
committerRubén Dávila <ruben@gitlab.com>2018-08-07 17:12:13 -0500
commitf4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00 (patch)
tree5eaa37479e8c04c35bd3cc30485ca97e73cef3eb /lib
parent21d6b3154d19e29b9aafd961812e7b8b516e1729 (diff)
downloadgitlab-shell-f4ce4a3c31a9a7fb2fa0bb7daa185d34b8c03c00.tar.gz
Pass custom git_config_options to Gitalyo
The /api/internal/allowed endpoint on GitLab has been updated to return some custom git options that can be used with git commands, we need to pass these received options to Gitaly.
Diffstat (limited to 'lib')
-rw-r--r--lib/action/gitaly.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/action/gitaly.rb b/lib/action/gitaly.rb
index b95ff17..6630b1d 100644
--- a/lib/action/gitaly.rb
+++ b/lib/action/gitaly.rb
@@ -11,10 +11,11 @@ module Action
'git-receive-pack' => File.join(ROOT_PATH, 'bin', 'gitaly-receive-pack')
}.freeze
- def initialize(actor, gl_repository, gl_username, git_protocol, repository_path, gitaly)
+ def initialize(actor, gl_repository, gl_username, git_config_options, git_protocol, repository_path, gitaly)
@actor = actor
@gl_repository = gl_repository
@gl_username = gl_username
+ @git_config_options = git_config_options
@git_protocol = git_protocol
@repository_path = repository_path
@gitaly = gitaly
@@ -24,6 +25,7 @@ module Action
new(actor,
json['gl_repository'],
json['gl_username'],
+ json['git_config_options'],
json['git_protocol'],
json['repository_path'],
json['gitaly'])
@@ -39,7 +41,7 @@ module Action
private
- attr_reader :actor, :gl_repository, :gl_username, :repository_path, :gitaly
+ attr_reader :actor, :gl_repository, :gl_username, :git_config_options, :repository_path, :gitaly
def git_protocol
@git_protocol || ENV['GIT_PROTOCOL'] # TODO: tidy this up
@@ -98,6 +100,7 @@ module Action
'gl_repository' => gl_repository,
'gl_id' => actor.identifier,
'gl_username' => gl_username,
+ 'git_config_options' => git_config_options,
'git_protocol' => git_protocol
}
end