mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
18 lines
445 B
Ruby
18 lines
445 B
Ruby
module Homebrew extend self
|
|
def log
|
|
if ARGV.named.empty?
|
|
cd HOMEBREW_REPOSITORY
|
|
exec "git", "log", *ARGV.options_only
|
|
else
|
|
begin
|
|
path = ARGV.formulae.first.path
|
|
rescue FormulaUnavailableError
|
|
# Maybe the formula was deleted
|
|
path = Formula.path(ARGV.named.first)
|
|
end
|
|
cd path.dirname # supports taps
|
|
exec "git", "log", *ARGV.options_only + ["--", path]
|
|
end
|
|
end
|
|
end
|