brew log works with Tapped formula

Fixes Homebrew/homebrew#12446.
This commit is contained in:
Max Howell 2012-08-05 10:34:44 -04:00
parent 4b5052f614
commit ac27ff1bdf

View File

@ -1,10 +1,12 @@
module Homebrew extend self
def log
cd HOMEBREW_REPOSITORY
if ARGV.named.empty?
cd HOMEBREW_REPOSITORY
exec "git", "log", *ARGV.options_only
else
exec "git", "log", *ARGV.options_only + ARGV.formulae.map(&:path)
path = ARGV.formulae.first.path.realpath
cd path.dirname # supports taps
exec "git", "log", *ARGV.options_only + [path]
end
end
end