def list_repo_state(repo):
    """
    Summarize the repository state in a dictionary.

    :param repo: a Repo object to summarize
    :type repo: :class:`git.Repo`

    :return: dictionary with key information about the repo
    :rtype: dict
    """
    return {'HEAD': repo.head.commit.hexsha,
            'branch': repo.active_branch.name,
            'modified_files': [f.a_path for f in repo.head.commit.diff(None)],
            'untracked_files': repo.untracked_files,
            'diff_vs_head': repo.git.diff(repo.head.commit.tree)}