Skip to content
Snippets Groups Projects
Commit 76ec69e3 authored by Dustin Rodrigues's avatar Dustin Rodrigues
Browse files

audit: compare current version to last committed version when seeing if revision should be removed

parent f5b71af6
No related branches found
No related tags found
No related merge requests found
......@@ -891,7 +891,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", ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment