Skip to content

Commit 873823f

Browse files
committed
BF: run commit hook with repo.working_dir as cwd
Otherwise commit hook might rightfully fail, as happens if repository is e.g. git-annex repository. See e.g. now failing https://travis-ci.org/datalad/datalad/builds/49802394\#L1590 which seems to pass tests nicely with patch as this
1 parent d8bbfea commit 873823f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

‎git/index/fun.py

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def run_commit_hook(name, index):
7272
env=env,
7373
stdout=subprocess.PIPE,
7474
stderr=subprocess.PIPE,
75+
cwd=index.repo.working_dir,
7576
close_fds=(os.name == 'posix'))
7677
stdout, stderr = cmd.communicate()
7778
cmd.stdout.close()

0 commit comments

Comments
 (0)