info: tap is a Tap object now

This commit is contained in:
Xu Cheng 2015-12-06 22:24:46 +08:00
parent d948ec231d
commit 62a623f0c3

View File

@ -67,18 +67,9 @@ module Homebrew
end end
def github_info(f) def github_info(f)
if f.tap? if f.tap
user, repo = f.tap.split("/", 2) if remote = f.tap.remote
tap = Tap.fetch user, repo path = f.path.relative_path_from(f.tap.path)
if remote = tap.remote
path = f.path.relative_path_from(tap.path)
github_remote_path(remote, path)
else
f.path
end
elsif f.core_formula?
if remote = git_origin
path = f.path.relative_path_from(HOMEBREW_REPOSITORY)
github_remote_path(remote, path) github_remote_path(remote, path)
else else
f.path f.path