Perhaps bonghits will fix my Git hooks
Don Marti <[email protected]> Tue, 28 Jan 2014 12:11:47 -0800
| Newsgroups | gmane.linux.elitists |
|---|---|
| Message-ID | <[email protected]> |
I'm thinking about keeping my Git hooks the same on all copies of a small repository. Here's what I have so far. 1. Move the actual content of the hook into the Makefile. (so that you can do "make pre-commit") 2. Rewrite the hook to just invoke make. 3. Add a "hooks" target to install the new simpler versions of the hooks. So I get something like... hooks : .git/hooks/pre-commit .git/hooks/% : Makefile echo "#!/bin/sh" > $@ echo "make `basename $@`" >> $@ chmod 755 $@ pre-commit : git diff-index --check HEAD Now is when I find out that this is a terrible idea, and why... -- Don Marti +1-510-332-1587 (mobile) http://zgp.org/~dmarti/ Alameda, California, USA [email protected] See you at SCaLE: 21-23 Feb. 2014, Los Angeles: socallinuxexpo.org _______________________________________________ Do not Cc: anyone else on mail sent to this list. The list server is set for maximum one recipient. linux-elitists mailing list [email protected] http://zgp.org/cgi-bin/mailman/listinfo/linux-elitists