What is going on in this pre-commit hook? I thought changing files would cause them to be restaged.
#!/bin/sh
#
# A git ho
Except that this does not work. I've tried doing the following at the end of my pre-commit hooks:
exec git diff-index --check --cached $against --
but the changes made in those hooks still do not actually get committed (at least in git 1.7.3.4).
If you actually want the changes to go in, you must explicitly
git add "$file"
for each file that you modified during the pre-commit phase.