[vtk-developers] Auto install git hooks

Timothy Shead tshead at sandia.gov
Thu Jun 17 14:52:45 EDT 2010


On 6/17/10 12:48 PM, Moreland, Kenneth wrote:
> 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.

FWIW, the Titan repo enforces this at configure-time, so you might see 
how it's being done there.

Cheers,
Tim


-- 
Timothy M. Shead
Sandia National Laboratories
1424, Data Analysis and Visualization




More information about the vtk-developers mailing list