Update source references in the git hooks.
Rename the pre- and post-receive hook deps to be more obvious.
Move the git hook helpers to their own template: they're not related to repo. (Better hook dep names too.)
Refactor the explicit ref_data check into per-item accessors that wrap the check.