audit_revision: only check 10 recent related commits
It helps to reduce overhead. Closes Homebrew/homebrew#48108. Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
parent
80efb92c35
commit
154d0850e7
@ -584,7 +584,7 @@ class FormulaAuditor
|
|||||||
return unless formula.tap # skip formula not from core or any taps
|
return unless formula.tap # skip formula not from core or any taps
|
||||||
return unless formula.tap.git? # git log is required
|
return unless formula.tap.git? # git log is required
|
||||||
|
|
||||||
fv = FormulaVersions.new(formula)
|
fv = FormulaVersions.new(formula, :max_depth => 10)
|
||||||
revision_map = fv.revision_map("origin/master")
|
revision_map = fv.revision_map("origin/master")
|
||||||
if (revisions = revision_map[formula.version]).any?
|
if (revisions = revision_map[formula.version]).any?
|
||||||
problem "revision should not decrease" if formula.revision < revisions.max
|
problem "revision should not decrease" if formula.revision < revisions.max
|
||||||
|
Loading…
x
Reference in New Issue
Block a user