Skip to content

Commit 7f8d9ca

Browse files
committed
fix(compat): make test work with git >= 2.5
1 parent e859042 commit 7f8d9ca

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎git/test/test_index.py

+3
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,9 @@ def make_paths():
690690
index.add(files, write=True)
691691
if os.name != 'nt':
692692
hp = hook_path('pre-commit', index.repo.git_dir)
693+
hpd = os.path.dirname(hp)
694+
if not os.path.isdir(hpd):
695+
os.mkdir(hpd)
693696
with open(hp, "wt") as fp:
694697
fp.write("#!/usr/bin/env sh\necho stdout; echo stderr 1>&2; exit 1")
695698
# end

0 commit comments

Comments
 (0)