If forked, open Github history of forked repository

This commit is contained in:
Christian Mayer 2009-08-31 18:33:40 +02:00 committed by Max Howell
parent 5b855386c3
commit 2a72c2fa0e

View File

@ -94,7 +94,10 @@ end
def info name
require 'formula'
history="http://github.com/mxcl/homebrew/commits/masterbrew/Library/Formula/#{Formula.path(name).basename}"
user=`cd #{HOMEBREW_PREFIX}; git remote -v show`.scan(/github.com:(.*)\/.*fetch/).to_s
user='mxcl' if user.empty?
history="http://github.com/#{user}/homebrew/commits/masterbrew/Library/Formula/#{Formula.path(name).basename}"
exec 'open', history if ARGV.flag? '--github'
f=Formula.factory name