def have_git() -> bool:  # pragma: no cover
    """Can we run the git executable?"""
    try:
        subprocess.check_output(['git', '--help'])
        return True
    except subprocess.CalledProcessError:
        return False
    except OSError:
        return False
Can we run the git executable?
pydantic/_internal/_git.py