def METHOD_NAME(
    sourcegit_and_remote, distgit_and_remote, api_instance_source_git
):
    """Check that an error is thrown if source-git commit referenced
    by a From-source-git trailer does not exist."""
    distgit, _ = distgit_and_remote
    (distgit / "file").write_text("foo")
    api_instance_source_git.dg.commit(
        "change", "", trailers=[(FROM_DIST_GIT_TOKEN, "abcd")]
    )
    with pytest.raises(PackitException):
        api_instance_source_git.sync_status()