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

        if ('' === trim($output)) {
            return array();
        }

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

        $retval = array();
        foreach ($lines as $line) {
            if (preg_match('/([A-Z\?\s])([A-Z\?\s])\s(.*)( -> (.*))?/', $line, $matches)) {
                list($fullmatch, $x, $y, $file) = $matches;

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

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

        return $retval;
    }