From 7bbaac26906863b9a09158346218457befb2821a Mon Sep 17 00:00:00 2001 From: Kostis Anagnostopoulos Date: Mon, 26 Sep 2016 12:32:28 +0200 Subject: test, #519: Popen() universal_newlin.es NoWindow in Winfoes + More win-fixes: + Do not check unicode files in < py3. + util, #519: x4 timeout of lock-file blocking, failing in Appveyor. --- git/index/fun.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'git/index/fun.py') diff --git a/git/index/fun.py b/git/index/fun.py index 4dd32b19..6026e232 100644 --- a/git/index/fun.py +++ b/git/index/fun.py @@ -12,9 +12,11 @@ from stat import ( from io import BytesIO import os +import sys import subprocess from git.util import IndexFileSHA1Writer +from git.cmd import Git from git.exc import ( UnmergedEntriesError, HookExecutionError @@ -74,7 +76,9 @@ def run_commit_hook(name, index): stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=index.repo.working_dir, - close_fds=(os.name == 'posix')) + close_fds=(os.name == 'posix'), + universal_newlines=True, + creationflags=Git.CREATE_NO_WINDOW if sys.platform == 'win32' else 0,) stdout, stderr = cmd.communicate() cmd.stdout.close() cmd.stderr.close() -- cgit v1.2.1