versions: don't recreate the relative path on each iteration

This commit is contained in:
Jack Nagel 2014-05-28 14:02:04 -05:00
parent 22e3e6c1e6
commit c49e23e77a

View File

@ -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