Make a separate 'git_hook' template from 'repo', renaming the hook deps.
Refactor the explicit ref_data check into per-item accessors that wrap the check.