mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
Handle GitLab's default SSH notation
On GitLab the default SSH style is like git@gitlab.example.com:user/repo Now it recognizes this format as well on your own GitLab installation.
This commit is contained in:
parent
485bb31427
commit
36f9a77956
3
git-open
3
git-open
|
|
@ -96,6 +96,9 @@ else
|
|||
if [ -n "$gitlab_domain" ]; then
|
||||
if grep -q "$gitlab_domain" <<<$giturl; then
|
||||
|
||||
# Handle GitLab's default SSH notation (like git@gitlab.domain.com:user/repo)
|
||||
giturl=${giturl/git\@${gitlab_domain}\:/https://${gitlab_domain}/}
|
||||
|
||||
# handle SSH protocol (links like ssh://git@gitlab.domain.com/user/repo)
|
||||
giturl=${giturl/#ssh\:\/\//https://}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue