diff options
author | Harmon <Harmon758@gmail.com> | 2020-02-07 06:23:53 -0600 |
---|---|---|
committer | Sebastian Thiel <sebastian.thiel@icloud.com> | 2020-02-08 10:55:50 +0800 |
commit | 55fd173c898da2930a331db7755a7338920d3c38 (patch) | |
tree | 5c25fca6831f9056787f90f7fabf76cafcad368b /git/objects/fun.py | |
parent | 768b9fffa58e82d6aa1f799bd5caebede9c9231b (diff) | |
download | gitpython-55fd173c898da2930a331db7755a7338920d3c38.tar.gz |
Remove and replace compat.text_type
Diffstat (limited to 'git/objects/fun.py')
-rw-r--r-- | git/objects/fun.py | 5 |
1 files changed, 2 insertions, 3 deletions
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 |