提交 a59316ea 编写于 作者: M Mislav Marohnić

Fix hub when a remote has local path instead of URL

Fixes #470
上级 7672e14c
......@@ -112,3 +112,9 @@ Feature: hub browse
Warning: the `-p` flag has no effect anymore\n
"""
But "open https://github.com/defunkt/hub" should be run
Scenario: Repo with remote with local path
Given I am in "git://github.com/mislav/dotfiles.git" git repo
And the "upstream" remote has url "../path/to/another/repo.git"
When I successfully run `hub browse`
Then "open https://github.com/mislav/dotfiles" should be run
......@@ -219,7 +219,7 @@ module Hub
end
def origin_remote
remotes.first
remotes.detect {|r| r.urls.any? }
end
def remote_by_name(remote_name)
......@@ -409,7 +409,7 @@ module Hub
rescue URI::InvalidURIError
end
end
end
end.compact
end
def with_normalized_url(url)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册