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];
    }
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];
    }
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 ] ; }
Returns the size of repository, in kilobytes.

@return int A sum, in kilobytes

@throws RuntimeException An error occurred while computing size
Returns the size of repository in kilobytes .