diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2015-08-29 16:25:40 +0200 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2015-08-29 16:25:40 +0200 |
commit | 7f8d9ca08352a28cba3b01e4340a24edc33e13e8 (patch) | |
tree | a43cfd052436c625b746bf85e0c4998011a04533 /git/test/test_index.py | |
parent | e8590424997ab1d578c777fe44bf7e4173036f93 (diff) | |
download | gitpython-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.py | 3 |
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 |