diff options
author | Nick Thomas <nick@gitlab.com> | 2018-08-01 14:50:26 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-08-01 14:50:26 +0000 |
commit | 5c15800283feec3122f89d93254743ae5f95bb25 (patch) | |
tree | e4e67ff81c5962ada99e2f09bf2e48596b2ff795 /lib/gitlab_shell.rb | |
parent | e3fead94b6f71d3501d586cbb2295ea0d1da2b31 (diff) | |
parent | 66e00351605afd524c1ac8df7fcd0690bd074747 (diff) | |
download | gitlab-shell-5c15800283feec3122f89d93254743ae5f95bb25.tar.gz |
Merge branch 'add-protocol-v2-logic' into 'master'
Add Git protocol v2
See merge request gitlab-org/gitlab-shell!217
Diffstat (limited to 'lib/gitlab_shell.rb')
-rw-r--r-- | lib/gitlab_shell.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb index 9f05004..78fdfe8 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 = ENV['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)] |