aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/log.rb
diff options
context:
space:
mode:
authorMax Howell2012-08-05 10:34:44 -0400
committerMax Howell2012-08-05 10:34:44 -0400
commitac27ff1bdfd0d637731538befaecafe5ac7ce04e (patch)
tree0a8d0f762509451c4d073dfad98847a21bca6363 /Library/Homebrew/cmd/log.rb
parent4b5052f614cef064ed68fcd854a82656256451ea (diff)
downloadbrew-ac27ff1bdfd0d637731538befaecafe5ac7ce04e.tar.bz2
`brew log` works with Tapped formula
Fixes Homebrew/homebrew#12446.
Diffstat (limited to 'Library/Homebrew/cmd/log.rb')
-rw-r--r--Library/Homebrew/cmd/log.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb
index ce2ef8dc7..0fc65113e 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