From 68e9ee845f9ae7c569fb424e9210f2d7fd4b265a Mon Sep 17 00:00:00 2001 From: Jens Aronsson Date: Mon, 2 Feb 2015 23:49:42 +0100 Subject: [PATCH] Updated bitbucket url. Bitbucket repo url doesn't use "/tree" but "/branch" instead. --- git-open | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-open b/git-open index d565d78..8e2e712 100755 --- a/git-open +++ b/git-open @@ -39,9 +39,11 @@ fi # Github support if grep -q github <<<$giturl; then giturl=${giturl/git\@github\.com\:/https://github.com/} + providerUrlDifference=tree # bitbucket support elif grep -q bitbucket <<<$giturl; then giturl=${giturl/git\@bitbucket\.org\:/https://bitbucket.org/} + providerUrlDifference=branch fi giturl=${giturl%\.git} @@ -56,7 +58,7 @@ fi if [ ! -z "$branch" ] then - giturl="${giturl}/tree/${branch}" + giturl="${giturl}/${providerUrlDifference}/${branch}" fi # simplify URL for master