summaryrefslogtreecommitdiff
path: root/git/index
diff options
context:
space:
mode:
Diffstat (limited to 'git/index')
-rw-r--r--git/index/fun.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/git/index/fun.py b/git/index/fun.py
index f8bd9d89..c1188ccb 100644
--- a/git/index/fun.py
+++ b/git/index/fun.py
@@ -72,6 +72,7 @@ def run_commit_hook(name, index):
env=env,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
+ cwd=index.repo.working_dir,
close_fds=(os.name == 'posix'))
stdout, stderr = cmd.communicate()
cmd.stdout.close()