diff options
Diffstat (limited to 'git/objects')
-rw-r--r-- | git/objects/commit.py | 3 | ||||
-rw-r--r-- | git/objects/fun.py | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/git/objects/commit.py b/git/objects/commit.py index f7201d90..8a84dd69 100644 --- a/git/objects/commit.py +++ b/git/objects/commit.py @@ -24,7 +24,6 @@ from .util import ( parse_actor_and_date, from_timestamp, ) -from git.compat import text_type from time import ( time, @@ -436,7 +435,7 @@ class Commit(base.Object, Iterable, Diffable, Traversable, Serializable): write(b"\n") # write plain bytes, be sure its encoded according to our encoding - if isinstance(self.message, text_type): + if isinstance(self.message, str): write(self.message.encode(self.encoding)) else: write(self.message) diff --git a/git/objects/fun.py b/git/objects/fun.py index 1b6cefa2..9b36712e 100644 --- a/git/objects/fun.py +++ b/git/objects/fun.py @@ -2,8 +2,7 @@ from stat import S_ISDIR from git.compat import ( safe_decode, - defenc, - text_type + defenc ) __all__ = ('tree_to_stream', 'tree_entries_from_data', 'traverse_trees_recursive', @@ -33,7 +32,7 @@ def tree_to_stream(entries, write): # hence we must convert to an utf8 string for it to work properly. # According to my tests, this is exactly what git does, that is it just # takes the input literally, which appears to be utf8 on linux. - if isinstance(name, text_type): + if isinstance(name, str): name = name.encode(defenc) write(b''.join((mode_str, b' ', name, b'\0', binsha))) # END for each item |