aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew/cmd/log.rb
diff options
context:
space:
mode:
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