From 4cede2368aa980e30340f0ed0a1906d65fe1046c Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Tue, 27 Sep 2016 17:09:41 +0200 Subject: Win, #519: Ensure fixtures & bashscript checked-out eol=lf + FIX all Diff TCs. --- git/compat.py | 4 ++-- git/index/fun.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'git') diff --git a/git/compat.py b/git/compat.py index dced3a5f..cbfb5785 100644 --- a/git/compat.py +++ b/git/compat.py @@ -88,9 +88,9 @@ class UnicodeMixin(object): """Mixin class to handle defining the proper __str__/__unicode__ methods in Python 2 or 3.""" - if sys.version_info[0] >= 3: # Python 3 + if PY3: def __str__(self): return self.__unicode__() else: # Python 2 def __str__(self): - return self.__unicode__().encode('utf8') + return self.__unicode__().encode(defenc) diff --git a/git/index/fun.py b/git/index/fun.py index 1e931b7c..80db46b1 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -76,7 +76,7 @@ def run_commit_hook(name, index): stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=index.repo.working_dir, - close_fds=(is_posix), + close_fds=is_posix, creationflags=PROC_CREATIONFLAGS,) stdout, stderr = cmd.communicate() cmd.stdout.close() -- cgit v1.2.3