aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMax Howell2012-08-05 10:34:44 -0400
committerMax Howell2012-08-05 10:34:44 -0400
commiteb96465868c8197594c2095d7e95d82f3576267d (patch)
treeeeca4ca522f3edbae7332e2f4f27431c433df268 /Library
parentc9b988c3538e2104bd240aee40cdd1ab23156d79 (diff)
downloadhomebrew-eb96465868c8197594c2095d7e95d82f3576267d.tar.bz2
`brew log` works with Tapped formula
Fixes #12446.
Diffstat (limited to 'Library')
-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