public function parseDiffOutput($output, array $arguments = array())
    {
        if (!isset($arguments['--name-status']) || false === $arguments['--name-status']) {
            // non name-status results are not supported
            return $output;
        }

        $lines = explode("\n", rtrim($output));

        $retval = array();
        foreach ($lines as $line) {
            if (preg_match('/([ACDMRTUXB])(\d*)\s+(.*)?/', $line, $matches)) {
                list($fullmatch, $status, $number, $filename) = $matches;

                if ($number && preg_match('/(.*\s)+(.*)/', $filename, $filenameMatches)) {
                    list($fullmatch, $originalName, $filename) = $filenameMatches;
                }

                $file = new VcsFileInfo($filename, $this->getClient()->getHead());
                $file->setStatus($status);

                $retval[] = $file;
            } else {
                throw new \Exception('Unable to parse line "'. $line . '"');
            }
        }

        return $retval;
    }