def _assert_empty_repo(self, repo):
        """Test all kinds of things with an empty, freshly initialized repo.

        It should throw good errors.
        """
        # Entries should be empty.
        self.assertEqual(len(repo.index.entries), 0)

        # head is accessible.
        assert repo.head
        assert repo.head.ref
        assert not repo.head.is_valid()

        # We can change the head to some other ref.
        head_ref = Head.from_path(repo, Head.to_full_path("some_head"))
        assert not head_ref.is_valid()
        repo.head.ref = head_ref

        # is_dirty can handle all kwargs.
        for args in ((1, 0, 0), (0, 1, 0), (0, 0, 1)):
            assert not repo.is_dirty(*args)
        # END for each arg

        # We can add a file to the index (if we are not bare).
        if not repo.bare:
            pass
        # END test repos with working tree
Test all kinds of things with an empty, freshly initialized repo.

        It should throw good errors.
        
test/test_repo.py