[vtk-developers] Auto install git hooks

Moreland, Kenneth kmorel at sandia.gov
Thu Jun 17 14:48:54 EDT 2010


Folks,

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.

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.

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.

-Ken

   ****      Kenneth Moreland
    ***      Sandia National Laboratories
***********
*** *** ***  email: kmorel at sandia.gov
**  ***  **  phone: (505) 844-8919
    ***      web:   http://www.cs.unm.edu/~kmorel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20100617/97aa24b0/attachment.html>


More information about the vtk-developers mailing list