I'm writing a pre-commit hook, and would like to do a check on the entire contents of each file that's about to be committed (specifically a lint check on the files). I want to lint check the file as it's going to be commited, not as it exists in my working tree (which may differ).
The pre-commit hook example that comes with git shows you how to get the diff (so you can examine for spaces and such), but I need to get the entire file as it's going to be committed.