As we reevaluate how to best support and maintain Staging Ref in the future, we encourage development teams using this environment to highlight their use cases in the following issue: https://gitlab.com/gitlab-com/gl-infra/software-delivery/framework/software-delivery-framework-issue-tracker/-/issues/36.

Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • idrozdov/gitlab-shell
  • mmj/gitlab-shell
2 results
Show changes
Commits on Source (5)
5.3.1
5.3.2
Loading
Loading
@@ -39,7 +39,7 @@ class GitlabNet
if resp.code == '200'
GitAccessStatus.create_from_json(resp.body)
else
GitAccessStatus.new(false, 'API is not accessible', nil, nil)
GitAccessStatus.new(false, 'API is not accessible', nil, nil, nil)
end
end
Loading
Loading
Loading
Loading
@@ -35,7 +35,7 @@ class GitlabShell
end
args = Shellwords.shellwords(origin_cmd)
parse_cmd(args)
args = parse_cmd(args)
if GIT_COMMANDS.include?(args.first)
GitlabMetrics.measure('verify-access') { verify_access }
Loading
Loading
@@ -67,10 +67,17 @@ class GitlabShell
protected
def parse_cmd(args)
@command = args.first
# Handle Git for Windows 2.14 using "git upload-pack" instead of git-upload-pack
if args.length == 3 && args.first == 'git'
@command = "git-#{args[1]}"
args = [@command, args.last]
else
@command = args.first
end
@git_access = @command
return if API_COMMANDS.include?(@command)
return args if API_COMMANDS.include?(@command)
raise DisallowedCommandError unless GIT_COMMANDS.include?(@command)
Loading
Loading
@@ -90,6 +97,8 @@ class GitlabShell
raise DisallowedCommandError unless args.count == 2
@repo_name = args.last
end
args
end
def verify_access
Loading
Loading
Loading
Loading
@@ -132,8 +132,8 @@ describe GitlabShell do
describe :exec do
let(:gitaly_message) { JSON.dump({ 'repository' => { 'relative_path' => repo_name, 'storage_name' => 'default' }, 'gl_repository' => gl_repository , 'gl_id' => key_id}) }
context 'git-upload-pack' do
let(:ssh_cmd) { "git-upload-pack gitlab-ci.git" }
shared_examples_for 'upload-pack' do |command|
let(:ssh_cmd) { "#{command} gitlab-ci.git" }
after { subject.exec(ssh_cmd) }
it "should process the command" do
Loading
Loading
@@ -157,6 +157,14 @@ describe GitlabShell do
end
end
context 'git-upload-pack' do
it_behaves_like 'upload-pack', 'git-upload-pack'
end
context 'git upload-pack' do
it_behaves_like 'upload-pack', 'git upload-pack'
end
context 'gitaly-upload-pack' do
let(:ssh_cmd) { "git-upload-pack gitlab-ci.git" }
before {
Loading
Loading