

def find_git():
    path = os.environ.get('PATH', '').split(os.pathsep)
    if (os.name == 'nt'):
        git_cmd = 'git.exe'
    else:
        git_cmd = 'git'
    git_path = _test_paths_for_executable(path, git_cmd)
    if (not git_path):
        if (os.name == 'nt'):
            extra_paths = (os.path.join(os.environ['ProgramFiles'], 'Git', 'bin'), os.path.join(os.environ['ProgramFiles(x86)'], 'Git', 'bin'))
        else:
            extra_paths = ('/usr/local/bin', '/usr/local/git/bin')
        git_path = _test_paths_for_executable(extra_paths, git_cmd)
    return git_path

dataset/ETHPy150Open JT5D/Alfred-Popclip-Sublime/Sublime Text 2/sublime-github/lib/git.py find_git/original