title: Git pre-commit hook: getting list of changed files
body: <p>I am developing validation and linting utility to be integrated with various commit hooks, including Git one</p>
  
  <p><a href="https://github.com/miohtama/vvv">https://github.com/miohtama/vvv</a></p>
  
  <p>Currently validators and linters are run against the whole project codebase on every commit. However, it would be much more optimal to run them against changed files only. For this, I would need to know changed files list in my Git precommit hook (in Python)</p>
  
  <p><a href="https://github.com/miohtama/vvv/blob/master/vvv/hooks/git.py">https://github.com/miohtama/vvv/blob/master/vvv/hooks/git.py</a></p>
  
  <p>What options I have to extract the changed files list (in Python if that matters)?</p>