diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 11:14:19 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-01-06 11:14:19 +0100 |
commit | a83eee5bcee64eeb000dd413ab55aa98dcc8c7f2 (patch) | |
tree | d398652edad72594cfda817068be710fad935c08 /git/objects | |
parent | b5a37564b6eec05b98c2efa5edcd1460a2df02aa (diff) | |
download | gitpython-a83eee5bcee64eeb000dd413ab55aa98dcc8c7f2.tar.gz |
test_refs works
Diffstat (limited to 'git/objects')
-rw-r--r-- | git/objects/tag.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/git/objects/tag.py b/git/objects/tag.py index 5e76e230..c8684447 100644 --- a/git/objects/tag.py +++ b/git/objects/tag.py @@ -10,6 +10,7 @@ from .util import ( parse_actor_and_date ) from gitdb.util import hex_to_bin +from git.compat import defenc __all__ = ("TagObject", ) @@ -52,11 +53,12 @@ class TagObject(base.Object): """Cache all our attributes at once""" if attr in TagObject.__slots__: ostream = self.repo.odb.stream(self.binsha) - lines = ostream.read().splitlines() + lines = ostream.read().decode(defenc).splitlines() obj, hexsha = lines[0].split(" ") # object <hexsha> type_token, type_name = lines[1].split(" ") # type <type_name> - self.object = get_object_type_by_name(type_name)(self.repo, hex_to_bin(hexsha)) + self.object = \ + get_object_type_by_name(type_name.encode('ascii'))(self.repo, hex_to_bin(hexsha)) self.tag = lines[2][4:] # tag <tag name> |