mirror of
https://github.com/adusak/bitbucket-git-helpers.plugin.zsh.git
synced 2026-03-26 11:21:01 +01:00
Update git-bb-open
This commit is contained in:
@@ -13,10 +13,11 @@ def constructURL
|
|||||||
remote = git_remote()
|
remote = git_remote()
|
||||||
bbloc = remote.index('bitbucket.org')
|
bbloc = remote.index('bitbucket.org')
|
||||||
if not bbloc
|
if not bbloc
|
||||||
puts "git-bb-open only works for repositories with their origin remote on bitbucket.org"
|
host = repo_url
|
||||||
exit 1
|
else
|
||||||
|
host = remote[bbloc..-5].sub(':','/')
|
||||||
end
|
end
|
||||||
url_prefix="https://#{remote[bbloc..-5].sub(':','/')}/src/#{git_commit}"
|
url_prefix="https://#{host}/src/#{git_commit}"
|
||||||
root = Pathname.new(git_root())
|
root = Pathname.new(git_root())
|
||||||
pwd = Pathname.new(Dir.pwd())
|
pwd = Pathname.new(Dir.pwd())
|
||||||
if ARGV.length == 1
|
if ARGV.length == 1
|
||||||
|
|||||||
Reference in New Issue
Block a user