versions: don't recreate the relative path on each iteration
This commit is contained in:
parent
22e3e6c1e6
commit
c49e23e77a
@ -16,11 +16,12 @@ module Homebrew extend self
|
|||||||
if ARGV.include? '--compact'
|
if ARGV.include? '--compact'
|
||||||
puts f.versions * " "
|
puts f.versions * " "
|
||||||
else
|
else
|
||||||
|
relative_path = f.pretty_relative_path
|
||||||
f.versions do |version, sha|
|
f.versions do |version, sha|
|
||||||
print Tty.white.to_s
|
print Tty.white.to_s
|
||||||
print "#{version.to_s.ljust(8)} "
|
print "#{version.to_s.ljust(8)} "
|
||||||
print Tty.reset.to_s
|
print Tty.reset.to_s
|
||||||
puts "git checkout #{sha} #{f.pretty_relative_path}"
|
puts "git checkout #{sha} #{relative_path}"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user