mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-17 01:08:41 +01:00
Ignore non-existing diffs in copied code detector script
Auditors: epriestley
This commit is contained in:
parent
e08b4cbb2c
commit
f362e5785f
1 changed files with 13 additions and 11 deletions
|
@ -29,6 +29,7 @@ list(, $from, $to) = $argv;
|
||||||
for ($diff_id = $from; $diff_id <= $to; $diff_id++) {
|
for ($diff_id = $from; $diff_id <= $to; $diff_id++) {
|
||||||
echo "Processing $diff_id";
|
echo "Processing $diff_id";
|
||||||
$diff = id(new DifferentialDiff())->load($diff_id);
|
$diff = id(new DifferentialDiff())->load($diff_id);
|
||||||
|
if ($diff) {
|
||||||
$diff->attachChangesets($diff->loadChangesets());
|
$diff->attachChangesets($diff->loadChangesets());
|
||||||
$orig_copy = array();
|
$orig_copy = array();
|
||||||
foreach ($diff->getChangesets() as $i => $changeset) {
|
foreach ($diff->getChangesets() as $i => $changeset) {
|
||||||
|
@ -42,6 +43,7 @@ for ($diff_id = $from; $diff_id <= $to; $diff_id++) {
|
||||||
$changeset->save();
|
$changeset->save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
echo "\n";
|
echo "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue