<HTML>
<HEAD>
<TITLE>Auto install git hooks</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Folks,<BR>
<BR>
I’ve been burned by trying to push commits to the main VTK/ParaView repository that are rejected due to the hooks in the server. The problem, as always, is because the commits were created in a local repository that had neglected to install hooks. I can see from the mailing list that I am not the only one.<BR>
<BR>
It would be great if local hooks were not optional. Git does not support that, but perhaps we could do the next best thing by automatically installing or updating the hooks during the compile or build processes. For all practical purposes, this would enforce the hooks.<BR>
<BR>
I think implementing this would be straightforward. You could simply issue CMake commands that check for the .git directory and then run the git commands that are listed on the web site. Yes, things could get complicated if someone has a repository that does not happen to have the origin remote point to the Kitware repository. But I speculate that 90% of clones do fall in this category, and I would rather have it work for most people than have it not implemented for anyone.<BR>
<BR>
-Ken<BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'><BR>
**** Kenneth Moreland<BR>
*** Sandia National Laboratories<BR>
*********** <BR>
*** *** *** email: <a href="kmorel@sandia.gov">kmorel@sandia.gov</a><BR>
** *** ** phone: (505) 844-8919<BR>
*** web: <a href="http://www.cs.unm.edu/~kmorel">http://www.cs.unm.edu/~kmorel</a><BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT>
</BODY>
</HTML>