← 返回首页
BF: run commit hook with repo.working_dir as cwd · gitpython-developers/GitPython@873823f · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

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

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎git/index/fun.py‎

Lines changed: 1 addition & 0 deletions
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)

Footer

© 2026 GitHub, Inc.