Skip to content

Commit

Permalink
Fixed a bug where Removed Files List is incorrect (bug #1126)
Browse files Browse the repository at this point in the history
  • Loading branch information
mystralkk committed Jun 15, 2022
1 parent e2f7939 commit ac6d364
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions system/build/tasks/MyRemoveUnchangedFilesTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ public function main()

// Create the 'removed-files' file
unset($lines);
exec(sprintf('git diff --name-only --diff-filter=R %s %s', $this->previousVersionSHA, $this->currentVersionSHA), $lines);
$removedFiles = array_filter($lines, [$this, 'shouldInclude']);
@file_put_contents('./public_html/docs/removed-files', implode("\n", $removedFiles) . "\n");
exec(sprintf('git diff --name-only --diff-filter=D %s %s', $this->previousVersionSHA, $this->currentVersionSHA), $lines);
@file_put_contents('./public_html/docs/removed-files', implode("\n", $lines) . "\n");

exec('git config --unset diff.renameLimit');

Expand Down

0 comments on commit ac6d364

Please sign in to comment.