protected function setup()
    {
        if (!$this->dir) {
            // Greate a temporary directory.
            $tempfile = tempnam(sys_get_temp_dir(), '');
            mkdir($tempfile.'.git');
            if (file_exists($tempfile)) {
                unlink($tempfile);
            }
            $this->dir = $tempfile.'.git';
            $this->git = $this->wrapper->init($this->dir);
        }
        if ($this->git) {
            $this->git->config('user.name', 'GitMerge');
            $this->git->config('user.email', 'gitmerge@php-merge.example.com');
            $this->git->config('merge.conflictStyle', 'diff3');
        }
    }
protected function setup()
    {
        if (!$this->dir) {
            // Greate a temporary directory.
            $tempfile = tempnam(sys_get_temp_dir(), '');
            mkdir($tempfile.'.git');
            if (file_exists($tempfile)) {
                unlink($tempfile);
            }
            $this->dir = $tempfile.'.git';
            $this->git = $this->wrapper->init($this->dir);
        }
        if ($this->git) {
            $this->git->config('user.name', 'GitMerge');
            $this->git->config('user.email', 'gitmerge@php-merge.example.com');
            $this->git->config('merge.conflictStyle', 'diff3');
        }
    }
protected function setup ( ) { if ( ! $ this -> dir ) { // Greate a temporary directory. $ tempfile = tempnam ( sys_get_temp_dir ( ) , '' ) ; mkdir ( $ tempfile . '.git' ) ; if ( file_exists ( $ tempfile ) ) { unlink ( $ tempfile ) ; } $ this -> dir = $ tempfile . '.git' ; $ this -> git = $ this -> wrapper -> init ( $ this -> dir ) ; } if ( $ this -> git ) { $ this -> git -> config ( 'user.name' , 'GitMerge' ) ; $ this -> git -> config ( 'user.email' , 'gitmerge@php-merge.example.com' ) ; $ this -> git -> config ( 'merge.conflictStyle' , 'diff3' ) ; } }
Set up the git wrapper and the temporary directory.
Set up the git wrapper and the temporary directory .