mirror of
https://github.com/paulirish/git-open.git
synced 2026-09-10 07:26:15 -04:00
Support for Github enterprise servers
* Only works if the server has 'github' in the domain name
This commit is contained in:
parent
f73d3e6aca
commit
fd36592ffe
8
git-open
8
git-open
|
|
@ -48,12 +48,12 @@ if grep -q gist.github <<<$giturl; then
|
|||
giturl=${giturl/git\@gist.github\.com\:/https://gist.github.com}
|
||||
providerUrlDifference=tree
|
||||
|
||||
# Github
|
||||
# Github (or enterprise Github if 'github' in url)
|
||||
elif grep -q github <<<$giturl; then
|
||||
giturl=${giturl/git\@github\.com\:/https://github.com/}
|
||||
|
||||
# handle SSH protocol (links like ssh://git@github.com/user/repo)
|
||||
giturl=${giturl/#ssh\:\/\/git\@github\.com\//https://github.com/}
|
||||
giturl=${giturl/#ssh\:\/\//}
|
||||
|
||||
giturl=`echo $giturl | sed 's/git\@\(github[^:]*\):/https:\/\/\1\//'`
|
||||
|
||||
providerUrlDifference=tree
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue