diff options
author | James Lopez <james@jameslopez.es> | 2018-07-30 10:58:31 +0200 |
---|---|---|
committer | James Lopez <james@jameslopez.es> | 2018-08-01 07:51:04 +0200 |
commit | 4304099c3fee2382aa10a0edb57d932779b83cc9 (patch) | |
tree | 0f70d52fcad9dfedfb1ece3334e6d4a5d682f185 /lib/gitlab_shell.rb | |
parent | e3fead94b6f71d3501d586cbb2295ea0d1da2b31 (diff) | |
download | gitlab-shell-4304099c3fee2382aa10a0edb57d932779b83cc9.tar.gz |
Add Git protocol v2
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r-- | lib/gitlab_shell.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index 9f05004..59aaa89 100644 --- a/lib/gitlab_shell.rb +++ b/lib/gitlab_shell.rb @@ -18,7 +18,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength API_COMMANDS = %w(2fa_recovery_codes).freeze GL_PROTOCOL = 'ssh'.freeze - attr_accessor :gl_id, :gl_repository, :repo_name, :command, :git_access + attr_accessor :gl_id, :gl_repository, :repo_name, :command, :git_access, :git_protocol attr_reader :repo_path def initialize(who) @@ -118,6 +118,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength self.repo_path = status.repository_path @gl_repository = status.gl_repository + @git_protocol = status.git_protocol @gitaly = status.gitaly @username = status.gl_username if defined?(@who) @@ -150,7 +151,8 @@ class GitlabShell # rubocop:disable Metrics/ClassLength 'repository' => @gitaly['repository'], 'gl_repository' => @gl_repository, 'gl_id' => @gl_id, - 'gl_username' => @username + 'gl_username' => @username, + 'git_protocol' => @git_protocol } args = [gitaly_address, JSON.dump(gitaly_request)] @@ -178,6 +180,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength 'GL_ID' => @gl_id, 'GL_PROTOCOL' => GL_PROTOCOL, 'GL_REPOSITORY' => @gl_repository, + 'GIT_PROTOCOL' => @git_protocol, 'GL_USERNAME' => @username } if @gitaly && @gitaly.include?('token') |