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‎

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

0 commit comments

Comments
(0)