Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-shell
Commits
66e00351
Commit
66e00351
authored
Jul 31, 2018
by
James Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use GIT_PROTOCOL env variable in gitlab_shell#exec
parent
72888f59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
lib/gitlab_shell.rb
lib/gitlab_shell.rb
+1
-1
spec/gitlab_shell_spec.rb
spec/gitlab_shell_spec.rb
+5
-1
No files found.
lib/gitlab_shell.rb
View file @
66e00351
...
@@ -118,7 +118,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
...
@@ -118,7 +118,7 @@ class GitlabShell # rubocop:disable Metrics/ClassLength
self
.
repo_path
=
status
.
repository_path
self
.
repo_path
=
status
.
repository_path
@gl_repository
=
status
.
gl_repository
@gl_repository
=
status
.
gl_repository
@git_protocol
=
status
.
git_protocol
@git_protocol
=
ENV
[
'GIT_PROTOCOL'
]
@gitaly
=
status
.
gitaly
@gitaly
=
status
.
gitaly
@username
=
status
.
gl_username
@username
=
status
.
gl_username
if
defined?
(
@who
)
if
defined?
(
@who
)
...
...
spec/gitlab_shell_spec.rb
View file @
66e00351
...
@@ -162,6 +162,10 @@ describe GitlabShell do
...
@@ -162,6 +162,10 @@ describe GitlabShell do
)
)
end
end
before
do
allow
(
ENV
).
to
receive
(
:[]
).
with
(
'GIT_PROTOCOL'
).
and_return
(
git_protocol
)
end
shared_examples_for
'upload-pack'
do
|
command
|
shared_examples_for
'upload-pack'
do
|
command
|
let
(
:ssh_cmd
)
{
"
#{
command
}
gitlab-ci.git"
}
let
(
:ssh_cmd
)
{
"
#{
command
}
gitlab-ci.git"
}
after
{
subject
.
exec
(
ssh_cmd
)
}
after
{
subject
.
exec
(
ssh_cmd
)
}
...
@@ -462,7 +466,7 @@ describe GitlabShell do
...
@@ -462,7 +466,7 @@ describe GitlabShell do
'GL_ID'
=>
gl_id
,
'GL_ID'
=>
gl_id
,
'GL_PROTOCOL'
=>
'ssh'
,
'GL_PROTOCOL'
=>
'ssh'
,
'GL_REPOSITORY'
=>
gl_repository
,
'GL_REPOSITORY'
=>
gl_repository
,
'GL_USERNAME'
=>
'testuser'
,
'GL_USERNAME'
=>
'testuser'
}
}
end
end
let
(
:exec_options
)
{
{
unsetenv_others:
true
,
chdir:
ROOT_PATH
}
}
let
(
:exec_options
)
{
{
unsetenv_others:
true
,
chdir:
ROOT_PATH
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment