Is there a way to get the affected files of a commit with a git post-commit hook?
git, hook, version-control
Solution
To get the raw data:
`git diff-tree HEAD`
Problem
I'm using git within a perforce repository. I want to be able to know exactly what files were affected by a git commit so I can turn around with a post-commit hook and open those files for edit in perforce, so the perforce server knows about the changes. Is there a way I can get a list, within the post-commit hook, of exactly what files were affected by the commit?