From ec21f8abacafcdb3034ffc8e7a2cfedc41c9d93f Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Mon, 23 Feb 2015 16:24:49 -0800 Subject: [PATCH] merge cleanup. --- git-open | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/git-open b/git-open index 0166ee7..a66e350 100755 --- a/git-open +++ b/git-open @@ -51,18 +51,16 @@ if grep -q github <<<$giturl; then elif grep -q bitbucket <<<$giturl; then giturl=${giturl/git\@bitbucket\.org\:/https://bitbucket.org/} providerUrlDifference=branch -# Atlassian Stash support - Stash URLs always contain the /scm/ part +# Atlassian Stash elif grep -q "/scm/" <<<$giturl; then re='(.*)/scm/(.*)/(.*)\.git' -fi -giturl=${giturl%\.git} - if [[ $giturl =~ $re ]] then giturl=${BASH_REMATCH[1]}/projects/${BASH_REMATCH[2]}/repos/${BASH_REMATCH[3]} providerUrlDifference=browse branch="?at=refs%2Fheads%2F${branch}" fi +# Gitlab else # custom gitlab gitlab_domain=$(git config --get gitopen.gitlab.domain)