diff --git a/hggit/hgrepo.py b/hggit/hgrepo.py
index c7b17b2a433a351d489afa7a71194ca8f8ab84bf_aGdnaXQvaGdyZXBvLnB5..c30efdf3fcb9b5bf603a9ea427ffd6ab4915041c_aGdnaXQvaGdyZXBvLnB5 100644
--- a/hggit/hgrepo.py
+++ b/hggit/hgrepo.py
@@ -49,8 +49,7 @@
             (tags, tagtypes) = super(hgrepo, self)._findtags()
 
             for tag, rev in compat.iteritems(self.githandler.tags):
-                if isinstance(tag, unicode):
-                    tag = tag.encode('utf-8')
+                assert isinstance(tag, bytes)
                 tags[tag] = bin(rev)
                 tagtypes[tag] = b'git'
             for tag, rev in compat.iteritems(self.githandler.remote_refs):
@@ -54,8 +53,7 @@
                 tags[tag] = bin(rev)
                 tagtypes[tag] = b'git'
             for tag, rev in compat.iteritems(self.githandler.remote_refs):
-                if isinstance(tag, unicode):
-                    tag = tag.encode('utf-8')
+                assert isinstance(tag, bytes)
                 tags[tag] = rev
                 tagtypes[tag] = b'git-remote'
             tags.update(self.githandler.remote_refs)