summaryrefslogtreecommitdiff
path: root/git/index/fun.py
diff options
context:
space:
mode:
authorKostis Anagnostopoulos <ankostis@gmail.com>2016-09-26 20:41:41 +0200
committerKostis Anagnostopoulos <ankostis@gmail.com>2016-09-27 12:37:16 +0200
commitf495e94028bfddc264727ffc464cd694ddd05ab8 (patch)
tree8c0bf309b08576f96c9344d9937344e1447d2237 /git/index/fun.py
parent29eb301700c41f0af7d57d923ad069cbdf636381 (diff)
downloadgitpython-f495e94028bfddc264727ffc464cd694ddd05ab8.tar.gz
src, #519: collect all is_<platform>() calls
Diffstat (limited to 'git/index/fun.py')
-rw-r--r--git/index/fun.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/git/index/fun.py b/git/index/fun.py
index 818847a2..98e2d3a0 100644
--- a/git/index/fun.py
+++ b/git/index/fun.py
@@ -43,7 +43,8 @@ from gitdb.typ import str_tree_type
from git.compat import (
defenc,
force_text,
- force_bytes
+ force_bytes,
+ is_posix,
)
S_IFGITLINK = S_IFLNK | S_IFDIR # a submodule
@@ -75,7 +76,7 @@ def run_commit_hook(name, index):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
cwd=index.repo.working_dir,
- close_fds=(os.name == 'posix'),
+ close_fds=(is_posix()),
universal_newlines=True,
creationflags=PROC_CREATIONFLAGS,)
stdout, stderr = cmd.communicate()