From ac27ff1bdfd0d637731538befaecafe5ac7ce04e Mon Sep 17 00:00:00 2001 From: Max Howell Date: Sun, 5 Aug 2012 10:34:44 -0400 Subject: [PATCH] `brew log` works with Tapped formula Fixes Homebrew/homebrew#12446. --- Library/Homebrew/cmd/log.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb index ce2ef8dc7e..0fc65113ec 100644 --- a/Library/Homebrew/cmd/log.rb +++ b/Library/Homebrew/cmd/log.rb @@ -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