diff options
| author | Jack Nagel | 2014-05-28 14:02:04 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-05-28 14:02:06 -0500 |
| commit | c49e23e77a1682b6ce4203cb0aa26b479993e1ff (patch) | |
| tree | acbf7e012384919a2fe10a7adc21fa6ba044ba60 /Library | |
| parent | 22e3e6c1e6050b00799384c35dc2c232da421748 (diff) | |
| download | brew-c49e23e77a1682b6ce4203cb0aa26b479993e1ff.tar.bz2 | |
versions: don't recreate the relative path on each iteration
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/cmd/versions.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb index 5fef98aaf..b634e24a8 100644 --- a/Library/Homebrew/cmd/versions.rb +++ b/Library/Homebrew/cmd/versions.rb @@ -16,11 +16,12 @@ module Homebrew extend self if ARGV.include? '--compact' puts f.versions * " " else + relative_path = f.pretty_relative_path f.versions do |version, sha| print Tty.white.to_s print "#{version.to_s.ljust(8)} " print Tty.reset.to_s - puts "git checkout #{sha} #{f.pretty_relative_path}" + puts "git checkout #{sha} #{relative_path}" end end end |
