audit: compare current version to last committed version when seeing if revision should be removed
This commit is contained in:
parent
f5b71af6de
commit
76ec69e3c3
@ -891,7 +891,8 @@ module Homebrew
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if previous_version != newest_committed_version &&
|
if (previous_version != newest_committed_version ||
|
||||||
|
current_version != newest_committed_version) &&
|
||||||
!current_revision.zero? &&
|
!current_revision.zero? &&
|
||||||
current_revision == newest_committed_revision &&
|
current_revision == newest_committed_revision &&
|
||||||
current_revision == previous_revision
|
current_revision == previous_revision
|
||||||
|
|||||||
@ -727,6 +727,12 @@ module Homebrew
|
|||||||
it { is_expected.to match("'revision 2' should be removed") }
|
it { is_expected.to match("'revision 2' should be removed") }
|
||||||
end
|
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
|
context "should not warn on an newer version revision removal" do
|
||||||
before do
|
before do
|
||||||
formula_gsub_origin_commit "revision 2", ""
|
formula_gsub_origin_commit "revision 2", ""
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user