aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorChristian Mayer2009-08-31 18:33:40 +0200
committerMax Howell2009-08-31 18:09:48 +0100
commit2a72c2fa0e01fa2f7c65880db9d6ed5aebe67ebe (patch)
tree4532e4fc86470d2094485255ea2270bd95922850 /Library
parent5b855386c312b47648132ff986bc25360477f92b (diff)
downloadbrew-2a72c2fa0e01fa2f7c65880db9d6ed5aebe67ebe.tar.bz2
If forked, open Github history of forked repository
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/brew.h.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index 70b5f784f..0c3183f41 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -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