src/PatchExecutor/PatchPatcher.php
private function findWindowsGitFolder()
    {
        list($rc, $stdOut) = $this->run('where git.exe');
        if ($rc !== 0) {
            return '';
        }
        $stdOut = str_replace("\r\n", "\n", $stdOut);
        foreach (explode("\n", trim($stdOut)) as $path) {
            $easierPath = str_replace('\\', '/', $path);
            $match = null;
            if (preg_match('_^(.+)/(?:cmd|bin)/git\.exe$_i', $easierPath, $match)) {
                return str_replace('/', '\\', $match[1]);
            }
        }

        return '';
    }
private function findWindowsGitFolder()
    {
        list($rc, $stdOut) = $this->run('where git.exe');
        if ($rc !== 0) {
            return '';
        }
        $stdOut = str_replace("\r\n", "\n", $stdOut);
        foreach (explode("\n", trim($stdOut)) as $path) {
            $easierPath = str_replace('\\', '/', $path);
            $match = null;
            if (preg_match('_^(.+)/(?:cmd|bin)/git\.exe$_i', $easierPath, $match)) {
                return str_replace('/', '\\', $match[1]);
            }
        }

        return '';
    }
private function findWindowsGitFolder ( ) { list ( $ rc , $ stdOut ) = $ this -> run ( 'where git.exe' ) ; if ( $ rc !== 0 ) { return '' ; } $ stdOut = str_replace ( "\r\n" , "\n" , $ stdOut ) ; foreach ( explode ( "\n" , trim ( $ stdOut ) ) as $ path ) { $ easierPath = str_replace ( '\\' , '/' , $ path ) ; $ match = null ; if ( preg_match ( '_^(.+)/(?:cmd|bin)/git\.exe$_i' , $ easierPath , $ match ) ) { return str_replace ( '/' , '\\' , $ match [ 1 ] ) ; } } return '' ; }
Search the path where git is installed on Windows.

@return string Empty string if not found
Search the path where git is installed on Windows .