summaryrefslogtreecommitdiff
path: root/git/test/test_index.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-08-29 16:25:40 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-08-29 16:25:40 +0200
commit7f8d9ca08352a28cba3b01e4340a24edc33e13e8 (patch)
treea43cfd052436c625b746bf85e0c4998011a04533 /git/test/test_index.py
parente8590424997ab1d578c777fe44bf7e4173036f93 (diff)
downloadgitpython-7f8d9ca08352a28cba3b01e4340a24edc33e13e8.tar.gz
fix(compat): make test work with git >= 2.5
Diffstat (limited to 'git/test/test_index.py')
-rw-r--r--git/test/test_index.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/git/test/test_index.py b/git/test/test_index.py
index ffc4bffe..a928fe5e 100644
--- a/git/test/test_index.py
+++ b/git/test/test_index.py
@@ -690,6 +690,9 @@ class TestIndex(TestBase):
index.add(files, write=True)
if os.name != 'nt':
hp = hook_path('pre-commit', index.repo.git_dir)
+ hpd = os.path.dirname(hp)
+ if not os.path.isdir(hpd):
+ os.mkdir(hpd)
with open(hp, "wt") as fp:
fp.write("#!/usr/bin/env sh\necho stdout; echo stderr 1>&2; exit 1")
# end