From 7f8d9ca08352a28cba3b01e4340a24edc33e13e8 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 29 Aug 2015 16:25:40 +0200 Subject: fix(compat): make test work with git >= 2.5 --- git/test/test_index.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'git/test/test_index.py') 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 -- cgit v1.2.1