From c2e65077f4e21383a20262590dc5bb59137e08f7 Mon Sep 17 00:00:00 2001 From: Lilian Besson Date: Fri, 8 Jul 2016 18:44:35 +0200 Subject: [PATCH] It works with both types of URL now It works with either ``ssh://git@bitbucket.org/user/repo.git`` or ``ssh://git@bitbucket.org:user/repo.git``. --- git-open | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-open b/git-open index 2688008..50dacfa 100755 --- a/git-open +++ b/git-open @@ -60,8 +60,8 @@ elif grep -q github <<<$giturl; then # bitbucket elif grep -q bitbucket <<<$giturl; then giturl=${giturl/git\@bitbucket\.org\:/https://bitbucket.org/} - # handle SSH protocol (links like ssh://git@github.com/user/repo) - giturl=${giturl/#ssh\:\/\/git\@bitbucket\.org\//https://bitbucket.org/} + # handle SSH protocol (change ssh://https://bitbucket.org/user/repo to https://bitbucket.org/user/repo) + giturl=${giturl/#ssh\:\/\/git\@/https://} rev="$(git rev-parse HEAD)" git_pwd="$(git rev-parse --show-prefix)"