mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
Updated bitbucket url.
Bitbucket repo url doesn't use "/tree" but "/branch" instead.
This commit is contained in:
parent
0133b064bc
commit
68e9ee845f
4
git-open
4
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue