[vtk-developers] Auto install git hooks

Moreland, Kenneth kmorel at sandia.gov
Fri Jul 16 12:51:21 EDT 2010


Maybe I'm being stupid, but if you are installing a pre-commit hook to check the hooks, why not just install the hooks you really want in the first place?

-Ken


On 7/16/10 10:30 AM, "Brad King" <brad.king at kitware.com> wrote:

On 07/05/2010 10:48 AM, Marcus D. Hanwell wrote:
> I pressed the button, and pushed this change into VTK master. I was
> going to check the dashboards and see what happens. I can push a very
> similar change into ParaView, but it just struck me that this has only
> been raised on the VTK developer list.
>
> I tried to make the instructions as explicit as possible for users and
> developers. Please let me know if you see any problems.

I updated the approach so that the instructions only get printed
when a developer first tries to commit:

  http://vtk.org/gitweb?p=VTK.git;a=commitdiff;h=ce1b0901

-Brad

commit ce1b09015176ea1c4191b726211f6028dede26c4
Author: Brad King <brad.king at kitware.com>
Date:   Fri Jul 16 10:22:24 2010 -0400

    Delay Git hooks setup until first commit

    Install a small .git/hooks/pre-commit script in the source tree at CMake
    configuration time instead of telling the user to do it.  When the user
    first attempts to commit this bootstrapping hook will trigger and print
    instructions to install the real hooks.  This approach allows us to
    require local hooks for commit but not for those who just want to build.

 .gitattributes                 |    1 +
 CMake/pre-commit               |   11 +++++++++++
 CMake/vtkCheckSourceTree.cmake |   29 +++++++++++++----------------
 3 files changed, 25 insertions(+), 16 deletions(-)


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


More information about the vtk-developers mailing list