Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
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
Jérome Perrin
gitlab-ce
Commits
36c76ec6
Commit
36c76ec6
authored
Feb 14, 2018
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Indent as Rubocop like
parent
305c8751
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
qa/qa/git/location.rb
qa/qa/git/location.rb
+9
-8
No files found.
qa/qa/git/location.rb
View file @
36c76ec6
...
...
@@ -13,14 +13,15 @@ module QA
# Settings#build_gitlab_shell_ssh_path_prefix
def
initialize
(
git_uri
)
@git_uri
=
git_uri
@uri
=
if
git_uri
.
start_with?
(
'ssh://'
)
URI
.
parse
(
git_uri
)
else
*
rest
,
path
=
git_uri
.
split
(
':'
)
# Host cannot have : so we'll need to escape it
user_host
=
rest
.
join
(
'%3A'
).
sub
(
/\A\[(.+)\]\z/
,
'\1'
)
URI
.
parse
(
"ssh://
#{
user_host
}
/
#{
path
}
"
)
end
@uri
=
if
git_uri
.
start_with?
(
'ssh://'
)
URI
.
parse
(
git_uri
)
else
*
rest
,
path
=
git_uri
.
split
(
':'
)
# Host cannot have : so we'll need to escape it
user_host
=
rest
.
join
(
'%3A'
).
sub
(
/\A\[(.+)\]\z/
,
'\1'
)
URI
.
parse
(
"ssh://
#{
user_host
}
/
#{
path
}
"
)
end
end
def
port
...
...
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