From cfee53578664599239cb437bba01d4453c814a9c Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Sun, 6 Apr 2014 00:31:07 -0500 Subject: Remove now unnecessary realpath calls --- Library/Homebrew/cmd/info.rb | 10 +++------- Library/Homebrew/cmd/log.rb | 2 +- Library/Homebrew/cmd/versions.rb | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) (limited to 'Library/Homebrew/cmd') diff --git a/Library/Homebrew/cmd/info.rb b/Library/Homebrew/cmd/info.rb index 512e27d5b..806a8e870 100644 --- a/Library/Homebrew/cmd/info.rb +++ b/Library/Homebrew/cmd/info.rb @@ -58,18 +58,14 @@ module Homebrew extend self end def github_info f - path = f.path.realpath - - if path.to_s =~ HOMEBREW_TAP_PATH_REGEX + if f.path.to_s =~ HOMEBREW_TAP_PATH_REGEX user = $1 repo = "homebrew-#$2" path = $3 else - path.parent.cd do - user = github_fork - end + user = f.path.parent.cd { github_fork } repo = "homebrew" - path = "Library/Formula/#{path.basename}" + path = "Library/Formula/#{f.path.basename}" end "https://github.com/#{user}/#{repo}/commits/master/#{path}" diff --git a/Library/Homebrew/cmd/log.rb b/Library/Homebrew/cmd/log.rb index ca005d553..bc245850a 100644 --- a/Library/Homebrew/cmd/log.rb +++ b/Library/Homebrew/cmd/log.rb @@ -5,7 +5,7 @@ module Homebrew extend self exec "git", "log", *ARGV.options_only else begin - path = ARGV.formulae.first.path.realpath + path = ARGV.formulae.first.path rescue FormulaUnavailableError # Maybe the formula was deleted path = Formula.path(ARGV.named.first) diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb index fa38cfca6..563e1588f 100644 --- a/Library/Homebrew/cmd/versions.rb +++ b/Library/Homebrew/cmd/versions.rb @@ -65,7 +65,7 @@ class Formula private def repository @repository ||= begin - if path.realpath.to_s =~ HOMEBREW_TAP_DIR_REGEX + if path.to_s =~ HOMEBREW_TAP_DIR_REGEX HOMEBREW_REPOSITORY/"Library/Taps/#$1-#$2" else HOMEBREW_REPOSITORY -- cgit v1.2.3