def is_git_repo_root(path):
    try:
        p = subprocess.Popen(['git', '-C', path, 'rev-parse', '--git-dir'],
                             stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        out, err = p.communicate()
        if p.returncode != 0:
            return False
        return (out.strip() == '.git')
    except __HOLE__:
        return False
dataset/ETHPy150Open scipy/scipy/benchmarks/run.py/is_git_repo_root