Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
  • Loading branch information
cweagans committed Feb 6, 2023
1 parent 04f2585 commit 9df6165
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/Patcher/GitPatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,35 +58,3 @@ public function canUse(): bool
return $usable;
}
}
/*
$patch_levels = $this->getConfig('patch-levels');
foreach ($patch_levels as $patch_level) {
if ($this->io->isVerbose()) {
$comment = 'Testing ability to patch with git apply.';
$comment .= ' This command may produce errors that can be safely ignored.';
$this->io->write('<comment>' . $comment . '</comment>');
}
$checked = $this->executeCommand(
'git -C %s apply --check -v %s %s',
$install_path,
$patch_level,
$filename
);
$output = $this->executor->getErrorOutput();
if (substr($output, 0, 7) === 'Skipped') {
// Git will indicate success but silently skip patches in some scenarios.
//
// @see https://github.com/cweagans/composer-patches/pull/165
$checked = false;
}
if ($checked) {
// Apply the first successful style.
$patched = $this->executeCommand(
'git -C %s apply %s %s',
$install_path,
$patch_level,
$filename
);
break;
}
*/

0 comments on commit 9df6165

Please sign in to comment.