diff options
| author | Mike McQuaid | 2017-02-22 08:50:09 +0000 |
|---|---|---|
| committer | GitHub | 2017-02-22 08:50:09 +0000 |
| commit | 06b318fb0dc3d83048093f0cb4c449cfad38b629 (patch) | |
| tree | 98d4bdaa40df08adca2c8508c3167279efb2e8d2 /Library | |
| parent | 3f05ad0731979580606aa98086337e07535e2030 (diff) | |
| parent | e793e526611ca4cbc6d0155af8c596c4e826fc41 (diff) | |
| download | brew-06b318fb0dc3d83048093f0cb4c449cfad38b629.tar.bz2 | |
Merge pull request #2100 from Homebrew/revert-1754-audit-fix-uncommitted-version-scheme
Revert "formula_versions: handle uncommitted formulae."
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/formula_versions.rb | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/Library/Homebrew/formula_versions.rb b/Library/Homebrew/formula_versions.rb index 34b766fde..28c2a3be8 100644 --- a/Library/Homebrew/formula_versions.rb +++ b/Library/Homebrew/formula_versions.rb @@ -15,7 +15,6 @@ class FormulaVersions @repository = formula.tap.path @entry_name = @path.relative_path_from(repository).to_s @max_depth = options[:max_depth] - @current_formula = formula end def rev_list(branch) @@ -65,33 +64,25 @@ class FormulaVersions attributes.each do |attribute| attributes_map[attribute] ||= {} - # Set the attributes for the current formula in case it's not been - # committed yet. - set_attribute_map(attributes_map[attribute], @current_formula, attribute) end rev_list(branch) do |rev| formula_at_revision(rev) do |f| attributes.each do |attribute| - set_attribute_map(attributes_map[attribute], f, attribute) + map = attributes_map[attribute] + if f.stable + map[:stable] ||= {} + map[:stable][f.stable.version] ||= [] + map[:stable][f.stable.version] << f.send(attribute) + end + next unless f.devel + map[:devel] ||= {} + map[:devel][f.devel.version] ||= [] + map[:devel][f.devel.version] << f.send(attribute) end end end attributes_map end - - private - - def set_attribute_map(map, f, attribute) - if f.stable - map[:stable] ||= {} - map[:stable][f.stable.version] ||= [] - map[:stable][f.stable.version] << f.send(attribute) - end - return unless f.devel - map[:devel] ||= {} - map[:devel][f.devel.version] ||= [] - map[:devel][f.devel.version] << f.send(attribute) - end end |
