def METHOD_NAME(hello_source_git_repo, hello_dist_git_repo):
    """Initializing a source-git repo fails, if the upstream_ref which
    should be the starting point of the downstream changes is not at
    the HEAD of the source-git repo.
    """
    readme = Path(hello_source_git_repo.working_dir, "README.md")
    with open(readme, "a") as fp:
        fp.write("\nSome new thing\n")
    hello_source_git_repo.git.add("README.md")
    hello_source_git_repo.git.commit(message="Add a new thing")
    sgg = SourceGitGenerator(
        config=flexmock(),
        source_git=hello_source_git_repo,
        dist_git=hello_dist_git_repo,
        upstream_ref=HELLO_RELEASE,
    )
    with pytest.raises(PackitException) as ex:
        sgg.create_from_upstream()
    assert "not pointing to the current HEAD" in str(ex.value)