private function patchExtractor($path, $extractor, $wantedAuthors)
    {
        if (!($this->diff && $extractor instanceof PatchingExtractor)) {
            return false;
        }

        $original = \explode("\n", $extractor->getBuffer($path));
        $new      = \explode("\n", $extractor->getBuffer($path, $wantedAuthors));
        $diff     = new \Diff($original, $new);
        $patch    = $diff->render($this->diff);

        if (empty($patch)) {
            return false;
        }

        $patchFile = $path;

        foreach ($this->config->getIncludedPaths() as $prefix) {
            $prefixLength = \strlen($prefix);
            if (strpos($path, $prefix) === 0) {
                $patchFile = \substr($path, $prefixLength);

                if (strncmp($patchFile, '/', 1) === 0) {
                    $patchFile = \substr($patchFile, 1);
                }
                break;
            }
        }

        $this->patchSet[] =
            'diff ' . $patchFile . ' ' . $patchFile . "\n" .
            '--- ' . $patchFile . "\n" .
            '+++ ' . $patchFile . "\n" .
            $patch;

        return true;
    }