Skip to content

Commit 3953d71

Browse files
committed
added support for non-ascii directories and file names
1 parent 1f66e25 commit 3953d71

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Diff for: git/compat.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@
3030
is_win = (os.name == 'nt')
3131
is_posix = (os.name == 'posix')
3232
is_darwin = (os.name == 'darwin')
33-
defenc = sys.getdefaultencoding()
33+
if hasattr(sys, 'getfilesystemencoding'):
34+
defenc = sys.getfilesystemencoding()
35+
if defenc is None:
36+
defenc = sys.getdefaultencoding()
3437

3538
if PY3:
3639
import io

Diff for: git/repo/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# This module is part of GitPython and is released under
55
# the BSD License: http://www.opensource.org/licenses/bsd-license.php
66

7+
from builtins import str
78
from collections import namedtuple
89
import logging
910
import os

0 commit comments

Comments
 (0)