Merge pull request #8576 from dtrodrigues/revision-audit
audit: compare current version to last committed version when seeing if revision should be reset
This commit is contained in:
commit
5ce013b0d0
@ -886,7 +886,8 @@ module Homebrew
|
||||
end
|
||||
end
|
||||
|
||||
if previous_version != newest_committed_version &&
|
||||
if (previous_version != newest_committed_version ||
|
||||
current_version != newest_committed_version) &&
|
||||
!current_revision.zero? &&
|
||||
current_revision == newest_committed_revision &&
|
||||
current_revision == previous_revision
|
||||
|
||||
@ -727,6 +727,12 @@ module Homebrew
|
||||
it { is_expected.to match("'revision 2' should be removed") }
|
||||
end
|
||||
|
||||
context "should be removed with a newer local version" do
|
||||
before { formula_gsub "foo-1.0.tar.gz", "foo-1.1.tar.gz" }
|
||||
|
||||
it { is_expected.to match("'revision 2' should be removed") }
|
||||
end
|
||||
|
||||
context "should not warn on an newer version revision removal" do
|
||||
before do
|
||||
formula_gsub_origin_commit "revision 2", ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user