aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Howell2009-08-31 21:05:23 +0100
committerMax Howell2009-08-31 21:20:09 +0100
commit14ef7f96f28bbf0443a674dd146d9cd15006699f (patch)
treeb39f8772c7fbf1e1b386711c6e367004a0123a64
parentb60d67db0a8018ca0e05ade60b8322dc8cc7fca0 (diff)
downloadhomebrew-14ef7f96f28bbf0443a674dd146d9cd15006699f.tar.bz2
Use github.user for github history link
Discussion: d60fc4ba86d45255b0093303c45f6b1c2196fda2
-rw-r--r--Library/Homebrew/brew.h.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/brew.h.rb b/Library/Homebrew/brew.h.rb
index b97201e1d..ed980ebb9 100644
--- a/Library/Homebrew/brew.h.rb
+++ b/Library/Homebrew/brew.h.rb
@@ -94,8 +94,9 @@ end
def info name
require 'formula'
- user=`cd #{HOMEBREW_PREFIX}; git remote -v show`.scan(/github.com:(.*)\/.*fetch/).to_s
+ user=`git config --global github.user`.chomp
user='mxcl' if user.empty?
+ # FIXME it would be nice if we didn't assume the default branch is masterbrew
history="http://github.com/#{user}/homebrew/commits/masterbrew/Library/Formula/#{Formula.path(name).basename}"
exec 'open', history if ARGV.flag? '--github'