diff options
author | Yaroslav Halchenko <debian@onerussian.com> | 2015-02-08 21:47:55 -0500 |
---|---|---|
committer | Yaroslav Halchenko <debian@onerussian.com> | 2015-02-08 21:47:55 -0500 |
commit | 873823f39275ceb8d65ebfae74206c7347e07123 (patch) | |
tree | 07f7c255050add4e6a70bf252a123ac6033085da /git/index/fun.py | |
parent | d8bbfea4cdcb36ce0e9ee7d7cad4c41096d4d54f (diff) | |
download | gitpython-873823f39275ceb8d65ebfae74206c7347e07123.tar.gz |
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
Diffstat (limited to 'git/index/fun.py')
-rw-r--r-- | git/index/fun.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/git/index/fun.py b/git/index/fun.py index f07cf7dc..c2fe912e 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() |