public function shell($command, array $env = array())
    {
        $argument = sprintf('%s \'%s\'', $command, $this->gitDir);

        $prefix = '';
        foreach ($env as $name => $value) {
            $prefix .= sprintf('export %s=%s;', escapeshellarg($name), escapeshellarg($value));
        }

        proc_open($prefix.'git shell -c '.escapeshellarg($argument), array(STDIN, STDOUT, STDERR), $pipes);
    }
public function shell($command, array $env = array())
    {
        $argument = sprintf('%s \'%s\'', $command, $this->gitDir);

        $prefix = '';
        foreach ($env as $name => $value) {
            $prefix .= sprintf('export %s=%s;', escapeshellarg($name), escapeshellarg($value));
        }

        proc_open($prefix.'git shell -c '.escapeshellarg($argument), array(STDIN, STDOUT, STDERR), $pipes);
    }
public function shell ( $ command , array $ env = array ( ) ) { $ argument = sprintf ( '%s \'%s\'' , $ command , $ this -> gitDir ) ; $ prefix = '' ; foreach ( $ env as $ name => $ value ) { $ prefix .= sprintf ( 'export %s=%s;' , escapeshellarg ( $ name ) , escapeshellarg ( $ value ) ) ; } proc_open ( $ prefix . 'git shell -c ' . escapeshellarg ( $ argument ) , array ( STDIN , STDOUT , STDERR ) , $ pipes ) ; }
Executes a shell command on the repository, using PHP pipes.

@param string $command The command to execute
Executes a shell command on the repository using PHP pipes .