aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/cmd/versions.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/Library/Homebrew/cmd/versions.rb b/Library/Homebrew/cmd/versions.rb
index d92627270..f76c7b8bb 100644
--- a/Library/Homebrew/cmd/versions.rb
+++ b/Library/Homebrew/cmd/versions.rb
@@ -31,7 +31,7 @@ end
class Formula
def versions
versions = []
- rev_list.each do |sha|
+ rev_list do |sha|
version = version_for_sha sha
unless versions.include? version or version.nil?
yield version, sha if block_given?
@@ -43,7 +43,7 @@ class Formula
def bottle_version_map branch='HEAD'
map = Hash.new { |h, k| h[k] = [] }
- rev_list(branch).each do |rev|
+ rev_list(branch) do |rev|
formula_for_sha(rev) do |f|
bottle = f.class.send(:bottle)
unless bottle.checksums.empty?
@@ -81,7 +81,9 @@ class Formula
def rev_list branch='HEAD'
repository.cd do
- `git rev-list --abbrev-commit --remove-empty #{branch} -- #{entry_name}`.split
+ IO.popen("git rev-list --abbrev-commit --remove-empty #{branch} -- #{entry_name}") do |io|
+ yield io.readline.chomp until io.eof?
+ end
end
end