From 36f9a779569ad97eaaa97421dc28c624f777fe4e Mon Sep 17 00:00:00 2001 From: Frank Fesevur Date: Thu, 27 Oct 2016 14:01:14 +0200 Subject: [PATCH] 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. --- git-open | 3 +++ 1 file changed, 3 insertions(+) diff --git a/git-open b/git-open index 302d4e7..cdc6437 100755 --- a/git-open +++ b/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://}