def METHOD_NAME(url, ref, enforce_sha, verify):
    """Return the checkout command to be used in the bootstrap phase.
    Args:
        url (str): url of the Spack repository
        ref (str): either a branch name, a tag or a commit sha
        enforce_sha (bool): if true turns every
        verify (bool):
    """
    url = url or "https://github.com/spack/spack.git"
    ref = ref or "develop"
    enforce_sha, verify = bool(enforce_sha), bool(verify)
    # If we want to enforce a sha or verify the ref we need
    # to checkout the repository locally
    if enforce_sha or verify:
        ref = _verify_ref(url, ref, enforce_sha)
    return " && ".join(
        [
            "git init --quiet",
            f"git remote add origin {shlex.quote(url)}",
            f"git fetch --depth=1 origin {shlex.quote(ref)}",
            "git checkout --detach FETCH_HEAD",
        ]
    )