summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab_access_status.rb4
-rw-r--r--lib/gitlab_shell.rb11
2 files changed, 2 insertions, 13 deletions
diff --git a/lib/gitlab_access_status.rb b/lib/gitlab_access_status.rb
index afb5a9e..96dd6e8 100644
--- a/lib/gitlab_access_status.rb
+++ b/lib/gitlab_access_status.rb
@@ -3,14 +3,13 @@ require 'json'
class GitAccessStatus
attr_reader :message, :gl_repository, :gl_id, :gl_username, :repository_path, :gitaly, :git_protocol, :git_config_options
- def initialize(status, message, gl_repository:, gl_id:, gl_username:, repository_path:, gitaly:, git_protocol:, git_config_options:)
+ def initialize(status, message, gl_repository:, gl_id:, gl_username:, gitaly:, git_protocol:, git_config_options:)
@status = status
@message = message
@gl_repository = gl_repository
@gl_id = gl_id
@gl_username = gl_username
@git_config_options = git_config_options
- @repository_path = repository_path
@gitaly = gitaly
@git_protocol = git_protocol
end
@@ -23,7 +22,6 @@ class GitAccessStatus
gl_id: values["gl_id"],
gl_username: values["gl_username"],
git_config_options: values["git_config_options"],
- repository_path: values["repository_path"],
gitaly: values["gitaly"],
git_protocol: values["git_protocol"])
end
diff --git a/lib/gitlab_shell.rb b/lib/gitlab_shell.rb
index 11494e0..4cabd37 100644
--- a/lib/gitlab_shell.rb
+++ b/lib/gitlab_shell.rb
@@ -19,7 +19,6 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
GL_PROTOCOL = 'ssh'.freeze
attr_accessor :gl_id, :gl_repository, :repo_name, :command, :git_access, :git_protocol
- attr_reader :repo_path
def initialize(who)
who_sym, = GitlabNet.parse_who(who)
@@ -116,7 +115,6 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
raise AccessDeniedError, status.message unless status.allowed?
- self.repo_path = status.repository_path
@gl_repository = status.gl_repository
@git_protocol = ENV['GIT_PROTOCOL']
@gitaly = status.gitaly
@@ -139,7 +137,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
end
executable = @command
- args = [repo_path]
+ args = []
if GITALY_MIGRATED_COMMANDS.key?(executable) && @gitaly
executable = GITALY_MIGRATED_COMMANDS[executable]
@@ -293,11 +291,4 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
return false
end
end
-
- def repo_path=(repo_path)
- raise ArgumentError, "Repository path not provided. Please make sure you're using GitLab v8.10 or later." unless repo_path
- raise InvalidRepositoryPathError if File.absolute_path(repo_path) != repo_path
-
- @repo_path = repo_path
- end
end