public function getSize()
    {
        $commandlineArguments = array('du', '-skc', $this->gitDir);
        $commandline = $this->normalizeCommandlineArguments($commandlineArguments);
        $process = new Process($commandline);
        $process->run();

        if (!preg_match('/(\d+)\s+total$/', trim($process->getOutput()), $vars)) {
            $message = sprintf("Unable to parse process output\ncommand: %s\noutput: %s", $process->getCommandLine(), $process->getOutput());

            if (null !== $this->logger) {
                $this->logger->error($message);
            }

            if (true === $this->debug) {
                throw new RuntimeException('unable to parse repository size output');
            }

            return;
        }

        return $vars[1];
    }